libresample icon indicating copy to clipboard operation
libresample copied to clipboard

Fix testresample.c output span; add exit code

Open matt-har-vey opened this issue 2 years ago • 1 comments

Prior to this chance, the "Resample with different factors" test only passed for 60 of the 63 factors, with the 3 failing ones being the largest.

  1. Since only 63 distinct factors were being considered, 100 random samples was overkill.
  2. To support noticing failure in continuous build systems, it's nice if the test exit()s with nonzero when there are failures.
  3. The root cause was a formula error when determining which indices in the resampled output ought be compared. Details are explained in a comment.

matt-har-vey avatar Nov 28 '23 00:11 matt-har-vey

@minorninth Just a ping to take a look at this; this PR would fix the testing machinery added in https://github.com/minorninth/libresample/pull/8. If you could merge this and tag a 0.1.5 release on the GitHub repository it’d be great for us and other downstreams :)

emilazy avatar Aug 25 '24 20:08 emilazy