Fixes for AssertNotNull
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "../extern/catch.hpp"
|
||||
#include "../src/Assert.hpp"
|
||||
void TestWrapper(bool wrapperExpression){Assert(wrapperExpression)}
|
||||
void TestWrapperNotNull(void* value){AssertNotNull(value)}
|
||||
|
||||
TEST_CASE("Assert succeeds if true", "[Utilities]") {
|
||||
REQUIRE_NOTHROW(TestWrapper(true));
|
||||
@@ -12,3 +13,5 @@ TEST_CASE("Assert throws if false with message", "[Utilities]") {
|
||||
REQUIRE_THROWS_WITH(TestWrapper(false),
|
||||
Catch::Matchers::Equals("ASSERTION FAILED: [AssertTests.cpp (3)] \"wrapperExpression\""));
|
||||
}
|
||||
|
||||
TEST_CASE("AssertNotNull throws if nullptr", "[Utilities]") { REQUIRE_THROWS(TestWrapperNotNull(nullptr)); }
|
||||
|
||||
Reference in New Issue
Block a user