Skip to content
Assertion outputs are serialized as a hex-encoded JSON string. A passing assertion is 0x225375636365737322, the hex of "Success". A failing one is the hex of {"Failure":"assertion failed: ..."}. Assertions are normally used inside pre_condition and post_condition blocks rather than printed as outputs.

​assert_eq

assert_eq asserts that two values are equal.

​Inputs

NameTypeDescription
leftanyA value to compare
rightanyThe value to compare against

​Output

NameTypeDescription
valueaddon(std::assertion)The result of the assertion

​assert_ne

assert_ne asserts that two values are not equal.

​Inputs

NameTypeDescription
leftanyA value to compare
rightanyThe value to compare against

​Output

NameTypeDescription
valueaddon(std::assertion)The result of the assertion

​assert_gt

assert_gt asserts that the left value is greater than the right value.

​Inputs

NameTypeDescription
leftinteger | floatAn integer or float to compare
rightinteger | floatAn integer or float to compare against

​Output

NameTypeDescription
valueaddon(std::assertion)The result of the assertion

​assert_gte

assert_gte asserts that the left value is greater than or equal to the right value.

​Inputs

NameTypeDescription
leftinteger | floatAn integer or float to compare
rightinteger | floatAn integer or float to compare against

​Output

NameTypeDescription
valueaddon(std::assertion)The result of the assertion

​assert_lt

assert_lt asserts that the left value is less than the right value.

​Inputs

NameTypeDescription
leftinteger | floatAn integer or float to compare
rightinteger | floatAn integer or float to compare against

​Output

NameTypeDescription
valueaddon(std::assertion)The result of the assertion

​assert_lte

assert_lte asserts that the left value is less than or equal to the right value.

​Inputs

NameTypeDescription
leftinteger | floatAn integer or float to compare
rightinteger | floatAn integer or float to compare against

​Output

NameTypeDescription
valueaddon(std::assertion)The result of the assertion