jxl-oxide icon indicating copy to clipboard operation
jxl-oxide copied to clipboard

More tests?

Open saschanaz opened this issue 2 years ago • 6 comments

This doesn't seem to have many tests 👀

saschanaz avatar Jun 18 '23 10:06 saschanaz

Thanks for your interest in jxl-oxide!

We currently running tests against the libjxl's conformance repository and have several custom regression tests. https://github.com/tirr-c/jxl-oxide/tree/main/crates/jxl-oxide/tests

Do you have any suggestions as to what tests would be desirable?

EugeneVert avatar Jun 18 '23 12:06 EugeneVert

Thanks, I totally missed that part!

Still I see many test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s messages in the CI job and those files indeed have no unit tests. Would be great to have some!

I wonder how the current test coverage is, is there some setup to track the coverage?

saschanaz avatar Jun 18 '23 14:06 saschanaz

Currently we have:

  • unit tests for DCT and IDCT (small, basic cases),
  • integration tests for the crate jxl-oxide:
  • and doc tests for jxl-oxide (these are compile-only tests).

I think most of the code are covered by the integration tests, so I didn't write unit tests that much. However I do think there are some components that would benefit from unit tests, such as entropy decoder. (Contributions are welcome!)

There is no code coverage setup, but one can collect coverage by following the documentation.

tirr-c avatar Jun 19 '23 05:06 tirr-c

There is no code coverage setup, but one can collect coverage by following the documentation.

Any intent to use something like Codecov to track the coverage? I'm considering to migrate to this from libjxl (for https://github.com/saschanaz/jxl-winthumb) and having to build to get the current coverage is not ideal to me.

saschanaz avatar Jun 19 '23 11:06 saschanaz

Created #55 to track it. Thanks for the suggestion!

tirr-c avatar Jun 19 '23 11:06 tirr-c

Coverage can be checked here. I hope this helps!

tirr-c avatar Jun 20 '23 06:06 tirr-c