safe_arch icon indicating copy to clipboard operation
safe_arch copied to clipboard

Convert all doc tests to integration tests

Open Lokathor opened this issue 5 years ago • 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).

Lokathor avatar May 11 '20 23:05 Lokathor

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.

Lokathor avatar May 15 '20 16:05 Lokathor

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

Soveu avatar May 19 '20 20:05 Soveu

yes that's a good idea.

Lokathor avatar May 19 '20 21:05 Lokathor

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.

Lokathor avatar May 30 '21 04:05 Lokathor