Replies: 2 comments
-
Interesting, I'm all for compile time testing and like the constexpr_test, I think expect could be extended this way. I've done some experimenting - https://godbolt.org/z/jxehbcYK8, based on simple static_assert/assert principle.
Any way, I'm more than happy to explore ideas. I think the |
Beta Was this translation helpful? Give feedback.
-
so the first 2 points I got ;-) when I develop and get UB then compile time may be hard so if I cant solve compile time error I turn off consteval_* commenting it out and then do debuging at runtime
getting back to main topic -> concepts are the only way, putting requirement on functions and classes significantly improve error messages for me. with the filter idea - some options templete param options{ .enabled=some_constexpr_var }, then You can disable at compile time tests<options{.enabled ...}> or expects<> |
Beta Was this translation helpful? Give feedback.
-
Hi I taught You may be interested as idea of templated tests.
When i started working with ut 1.x I needed something more that just runtime tests.
So I utilized Your ut as runtime component and I wrote consteval part
short:
example
https://github.com/arturbac/small_vectors/blob/master/unit_tests/string_ut.cc
all functionality in
https://github.com/arturbac/small_vectors/blob/master/unit_tests/ut_core/unit_test_core.h
Beta Was this translation helpful? Give feedback.
All reactions