Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 550 Bytes

File metadata and controls

20 lines (13 loc) · 550 Bytes

assert_false

Asserts that a boolean value is false.

Use assert_false when the value under test is already a boolean result. Prefer a more specific assertion when the actual intent is equality, ordering, nullness, containment, matching, or exception behavior.

#include <kaycxx/assert.hpp>

using namespace kaycxx::assert;

int main() {
    auto has_error = false;

    assert_false(has_error);
    assert_false(has_error, "The operation should finish without errors");
}

On failure, assert_false(true) throws assertion_error.