From 8388994da0ac08497fb57d7d4b29ef7eb00731f2 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Wed, 11 Dec 2024 16:15:16 +0100 Subject: implemented feedback on test --- src/test/RenderSystemTest.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/test/RenderSystemTest.cpp b/src/test/RenderSystemTest.cpp index eb5033b..b4519cb 100644 --- a/src/test/RenderSystemTest.cpp +++ b/src/test/RenderSystemTest.cpp @@ -49,7 +49,6 @@ public: .size = {10, 10}, }); - //ASSERT_NE(sprite1.texture.texture.get(), nullptr); EXPECT_EQ(sprite1.data.order_in_layer, 5); EXPECT_EQ(sprite1.data.sorting_in_layer, 5); auto & sprite2 @@ -59,7 +58,6 @@ public: .sorting_in_layer = 2, .order_in_layer = 1, }); - //ASSERT_NE(sprite2.texture.texture.get(), nullptr); EXPECT_EQ(sprite2.data.sorting_in_layer, 2); EXPECT_EQ(sprite2.data.order_in_layer, 1); @@ -70,7 +68,6 @@ public: .sorting_in_layer = 1, .order_in_layer = 2, }); - //ASSERT_NE(sprite3.texture.texture.get(), nullptr); EXPECT_EQ(sprite3.data.sorting_in_layer, 1); EXPECT_EQ(sprite3.data.order_in_layer, 2); @@ -81,27 +78,12 @@ public: .sorting_in_layer = 1, .order_in_layer = 1, }); - //ASSERT_NE(sprite4.texture.texture.get(), nullptr); EXPECT_EQ(sprite4.data.sorting_in_layer, 1); EXPECT_EQ(sprite4.data.order_in_layer, 1); } }; -TEST_F(RenderSystemTest, expected_throws) { - GameObject entity1 = this->mgr.new_object("NAME"); - - // no texture img - EXPECT_NO_THROW({ - auto test = Asset(""); - auto & sprite1 = entity1.add_component( - test, Sprite::Data{ - .color = Color(0, 0, 0, 0), - .flip = Sprite::FlipSettings{false, false}, - .sorting_in_layer = 1, - .order_in_layer = 1, - }); - }); - +TEST_F(RenderSystemTest, NoCamera) { // No camera EXPECT_ANY_THROW({ this->sys.update(); }); } -- cgit v1.2.3