bitwizeshift / oxtest

🚧 A WIP rust unit-testing library
https://bitwizeshift.github.io/neotest
Apache License 2.0
0 stars 0 forks source link

Add assertions utilities #7

Open bitwizeshift opened 1 year ago

bitwizeshift commented 1 year ago

Blocked by #6

The builtin assertions are lackluster for testing in that they only cover assert_eq, assert_ne, assert, and assert_match (nightly). Ideally we should have the full collection of unit test assertion helpers like mature unit test libraries have, such as GTest.

This is to track adding assertions for eq, ne, true, false, regex, match, etc. These should make use of the test-return-types, which also enables adding simple succeed!() and fail!() macros.

bitwizeshift commented 1 year ago

As per #15, this might need to be revisited at a later time.

Alternatively, both assertions and non-panicking-assertions can be provided. For example, perhaps doing: