Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing unit tests #3

Open
ppinard opened this issue Jun 12, 2020 · 2 comments
Open

Failing unit tests #3

ppinard opened this issue Jun 12, 2020 · 2 comments

Comments

@ppinard
Copy link

ppinard commented Jun 12, 2020

I was trying to run all the unit tests and I get 9 errors and 44 failures. The first 5 are below and I attached the full test report. I was wondering whether this is expected. I am running Java 14 Adopt OpenJDK (hotspot) on Ubuntu 20.04.

  • IonizationCrossSectionTest.testOne: java.lang.NullPointerException
  • FluorescenceTest.testOne: junit.framework.AssertionFailedError: expected:<1.0184813419284855> but was:<1.0285>
  • Math2Test.testQuadratic: java.lang.NullPointerException
  • XRayTransitionSetTest.testOne: java.lang.AssertionError: L3 and M5 + 2 others
  • BackscatterFactorTest.testDuncumb81A: expected:<1.0436220733027965> but was:<1.0396>

src 20200612-124120.txt

@NicholasWMRitchie
Copy link
Member

I've been going through the unit tests. I've fixed a handful of minor bugs and eliminated a number of classes that never worked. I created the test cases, attempt to implement the algorithm and never succeeded for one reason or another. I've eliminated PAPIteration and HyperbolicIteration. I never could make these algorithms reliable. I've eliminated Proza96. It almost worked and I never found the time to fix it. There were a couple of bugs wrt parsing chemical formulas in screwball edgecases. Most of the time parsing worked just fine.
Now I'm down to 14 issues - Most of these have to do with implementing bits and pieces of matrix correction algorithms. I'm not sure whether the errors reflect that the code is incorrect or whether the test cases are incorrect. This is always the problem with implementing numerical algorithms. You rarely now what the correct answer is without comparison to a third-party example.

@ppinard
Copy link
Author

ppinard commented Jun 21, 2020

This is always the problem with implementing numerical algorithms. You rarely now what the correct answer is without comparison to a third-party example.

Indeed and even if the results differ from a third-party example, it becomes difficult to know which implementation is correct. I think regression tests are useful to assess whether a code change has an unexpected impact on other parts of the code.

Sorry if I gave you more work. I just wanted to make sure all the tests pass before submitting any new pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants