More fixes for Assert.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-03-22 12:05:16 +01:00
parent aa1b90554f
commit 638a414961
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 2 additions and 3 deletions

View File

@ -17,4 +17,4 @@
#define Assert(expr)
#endif
#define AssertNotNull(value) Assert(value != nullptr)
#define AssertNotNull(value) Assert(value != nullptr);

View File

@ -1,6 +1,6 @@
#include "../extern/catch.hpp"
#include "../src/Assert.hpp"
void TestWrapper(bool wrapperExpression){Assert(wrapperExpression)}
void TestWrapper(bool wrapperExpression) { Assert(wrapperExpression) }
void TestWrapperNotNull(void* value){AssertNotNull(value)}
TEST_CASE("Assert succeeds if true", "[Utilities]") {
@ -20,5 +20,4 @@ TEST_CASE("Multiple asserts", "[Utilities]") {
Assert(true);
}
TEST_CASE("AssertNotNull throws if nullptr", "[Utilities]") { REQUIRE_THROWS(TestWrapperNotNull(nullptr)); }