std::testingTesting assertion library for Hew.
Provides assertion functions that panic with descriptive messages on failure. No Rust FFI โ pure Hew only.
import std::testing;
fn main() {
testing.assert_eq(1 + 1, 2);
testing.assert_true(10 > 5);
testing.assert_eq_str("hello", "hello");
}
assert_eqAssert that two integers are equal. Panics with a message showing the expected and actual values when they differ.
assert_eq_u8Assert that two u8 byte values are equal. Panics with a message
showing the expected and actual values when they differ.
assert_ne_u8Assert that two u8 byte values are not equal. Panics when a == b.
assert_eq_strAssert that two strings are equal. Panics with a message showing the expected and actual values when they differ.
assert_neAssert that two integers are not equal. Panics when a == b.
assert_trueAssert that a condition is true. Panics when condition is false.
assert_falseAssert that a condition is false. Panics when condition is true.
assert_gtAssert that a is strictly greater than b.
assert_ltAssert that a is strictly less than b.