Lokathor/safe_arch

Convert all doc tests to integration tests

Lokathor opened this issue · 4 comments

Currently all the tests are done via doc tests.

This means that most functions have only a single test case.

Particularly for a lot of the macros we probably want tests that check all sorts of edge cases. These should be put into the crate as integration tests (that is, modules in the tests/ folder).

I'm marking this as "good first issue", but I don't expect people to contribute every single integration test in a single PR.

If you'd like to add even one good set of testing for a macro i'd accept an improvement in this area.

Soveu commented

Can I use bytemuck for tests? pod_align_to can be helpful to ensure correct alignment for example when using Vec<f32> as &[f32] and &[m256] slices
This would also test the bytemuck feature

yes that's a good idea.

update: yeah the more i do this the more you can see the speed gains within the test suite.

it's boring, but certainly a nice to have. I can continue to convert one module over at a time when i've got an extra boring weekend day or whatever.