aboutsummaryrefslogtreecommitdiff
path: root/src/test/AssetTest.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-22 21:57:08 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-22 21:57:08 +0100
commit004ee3aafb6beb4e984877186bced560010f4ddb (patch)
tree9f6f79dd0a2c50e35bcc7bd5d76b0e41a20af7a7 /src/test/AssetTest.cpp
parent1499363d85abedbdb571e33801b821f4dfabc638 (diff)
fix RenderSystem unit test path resolution + reset Config before each testloek/hotfix
Diffstat (limited to 'src/test/AssetTest.cpp')
-rw-r--r--src/test/AssetTest.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/test/AssetTest.cpp b/src/test/AssetTest.cpp
index 8aa7629..c3c166c 100644
--- a/src/test/AssetTest.cpp
+++ b/src/test/AssetTest.cpp
@@ -7,20 +7,16 @@ using namespace std;
using namespace crepe;
using namespace testing;
-class AssetTest : public Test {
-public:
- Config & cfg = Config::get_instance();
- void SetUp() override { this->cfg.asset.root_pattern = ".crepe-root"; }
-};
-
-TEST_F(AssetTest, Existant) { ASSERT_NO_THROW(Asset{"asset/texture/img.png"}); }
+TEST(AssetTest, Existant) { ASSERT_NO_THROW(Asset{"asset/texture/img.png"}); }
-TEST_F(AssetTest, Nonexistant) { ASSERT_ANY_THROW(Asset{"asset/nonexistant"}); }
+TEST(AssetTest, Nonexistant) { ASSERT_ANY_THROW(Asset{"asset/nonexistant"}); }
-TEST_F(AssetTest, Rootless) {
+TEST(AssetTest, Rootless) {
+ Config & cfg = Config::get_instance();
cfg.asset.root_pattern.clear();
string arbitrary = "\\/this is / /../passed through as-is";
Asset asset{arbitrary};
ASSERT_EQ(arbitrary, asset.get_path());
}
+