test.internal.assert


using tag_t = newtype<uint32> §
inline void print_failure(tag_t tag) §
inline void assert(tag_t tag, bool cond) §

Fail test with the specified tag when the condition is false. Test failure triggers sim_assert, prints information about failing test, and sets global status to the test tag.

inline void assert_string(tag_t tag, bool cond, const string message) §

Fail test with the specified tag when the condition is false. Test failure triggers sim_assert, prints information about failing test and the supplied message, and sets global status to the test tag.

template <typename T>
inline void assert_equal(tag_t tag, T expected, T actual) §

Fail test with the specified tag when the arguments are not equal. Test failure triggers sim_assert, prints information about failing test, and sets global status to the test tag.

Arguments

  • tag_t tag
    

    Test tag

  • T expected
    

    Expected value

  • T actual
    

    Actual value