Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 472 Bytes

File metadata and controls

18 lines (12 loc) · 472 Bytes

assert_not_equal

Asserts that two values are not equal.

The comparison rules are the inverse of assert_equal: normal values use operator==, while C string forms compare text content instead of pointer identity.

#include <kaycxx/assert.hpp>

using namespace kaycxx::assert;

int main() {
    assert_not_equal(41, 42);
    assert_not_equal("debug", "release");
}

On failure, assert_not_equal throws assertion_error because the values compare equal.