-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The condition parameter (cond) of cpp_assert(cond desc) is documented as "This can be anything that can be passed to CMake’s if statement". When cond evaluates to false in an if statement, the assert should crash the program. An empty string evaluates to false in CMake's if statement, but does not trigger cpp_assert.
To Reproduce
The following code will not trigger the assertion that would print "Empty string!" and crash the program, instead printing "The program did not crash.".
cpp_assert("" "Empty string!")
message("The program did not crash.")
Expected behavior
The assert should be triggered, printing "Empty string!" and crashing the program.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working