This commit is contained in:
2 files changed
+2
-3
No files matched your search
+1
-1
@@ -17,4 +17,4 @@
|
|||||||
#define Assert(expr)
|
#define Assert(expr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AssertNotNull(value) Assert(value != nullptr)
|
#define AssertNotNull(value) Assert(value != nullptr);
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "../extern/catch.hpp"
|
#include "../extern/catch.hpp"
|
||||||
#include "../src/Assert.hpp"
|
#include "../src/Assert.hpp"
|
||||||
void TestWrapper(bool wrapperExpression){Assert(wrapperExpression)}
|
void TestWrapper(bool wrapperExpression) { Assert(wrapperExpression) }
|
||||||
void TestWrapperNotNull(void* value){AssertNotNull(value)}
|
void TestWrapperNotNull(void* value){AssertNotNull(value)}
|
||||||
|
|
||||||
TEST_CASE("Assert succeeds if true", "[Utilities]") {
|
TEST_CASE("Assert succeeds if true", "[Utilities]") {
|
||||||
@@ -20,5 +20,4 @@ TEST_CASE("Multiple asserts", "[Utilities]") {
|
|||||||
Assert(true);
|
Assert(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("AssertNotNull throws if nullptr", "[Utilities]") { REQUIRE_THROWS(TestWrapperNotNull(nullptr)); }
|
TEST_CASE("AssertNotNull throws if nullptr", "[Utilities]") { REQUIRE_THROWS(TestWrapperNotNull(nullptr)); }
|
||||||
Reference in new issue
Block a user