usnistgov / EPQ

EPQ is the Electron Probe Quantification library - the basis for DTSA-II
10 stars 9 forks source link

Failing unit tests #3

Open ppinard opened 4 years ago

ppinard commented 4 years ago

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.

src 20200612-124120.txt

NicholasWMRitchie commented 4 years ago

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 commented 4 years ago

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.