diff --git a/test/unit/build.cpp b/test/unit/build.cpp index 38c4372b..7199a16a 100644 --- a/test/unit/build.cpp +++ b/test/unit/build.cpp @@ -20,6 +20,7 @@ namespace lol LOLUNIT_FIXTURE(BuildTest) { +#if !defined LOL_DEBUG LOLUNIT_TEST(FastMath) { double x, y; @@ -31,6 +32,7 @@ LOLUNIT_FIXTURE(BuildTest) LOLUNIT_ASSERT_EQUAL(x, y); } +#endif LOLUNIT_TEST(FastMathOverride) { diff --git a/test/unit/image.cpp b/test/unit/image.cpp index ae2a5a80..7e291dc8 100644 --- a/test/unit/image.cpp +++ b/test/unit/image.cpp @@ -24,14 +24,13 @@ LOLUNIT_FIXTURE(ImageTest) { LOLUNIT_TEST(OpenImage) { - Image *image = new Image("data/gradient.png"); - LOLUNIT_ASSERT(image); + Image image("data/gradient.png"); - ivec2 size = image->GetSize(); + ivec2 size = image.GetSize(); LOLUNIT_ASSERT_EQUAL(size.x, 256); LOLUNIT_ASSERT_EQUAL(size.y, 16); - uint8_t *data = (uint8_t *)image->GetData(); + uint8_t *data = (uint8_t *)image.GetData(); LOLUNIT_ASSERT(data); LOLUNIT_ASSERT_EQUAL((int)data[0], 0x00); @@ -41,8 +40,6 @@ LOLUNIT_FIXTURE(ImageTest) LOLUNIT_ASSERT_EQUAL((int)data[255 * 4 + 0], 0xff); LOLUNIT_ASSERT_EQUAL((int)data[255 * 4 + 1], 0xff); LOLUNIT_ASSERT_EQUAL((int)data[255 * 4 + 2], 0xff); - - delete image; } };