From fbc85c388f3c73a2a27d7f664b9d16ff1fd10855 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Wed, 23 Aug 2023 19:10:34 +0100 Subject: [PATCH] fixup string to path --- src/tests/api/internals/game/game_test.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tests/api/internals/game/game_test.h b/src/tests/api/internals/game/game_test.h index 7266c8cf..a02ac8dd 100644 --- a/src/tests/api/internals/game/game_test.h +++ b/src/tests/api/internals/game/game_test.h @@ -150,7 +150,9 @@ TEST_P( TEST_P(GameTest, isValidPluginShouldResolveRelativePathsRelativeToDataPath) { const Game game(GetParam(), dataPath.parent_path(), localPath); - game.IsValidPlugin("../" + dataPath.filename().u8string() + "/" + blankEsm); + const auto path = ".." / dataPath.filename() / blankEsm; + + EXPECT_TRUE(game.IsValidPlugin(path)); } TEST_P(GameTest, isValidPluginShouldUseAbsolutePathsAsGiven) { @@ -159,7 +161,8 @@ TEST_P(GameTest, isValidPluginShouldUseAbsolutePathsAsGiven) { ASSERT_TRUE(dataPath.is_absolute()); const auto path = dataPath / std::filesystem::u8path(blankEsm); - game.IsValidPlugin(path.u8string()); + + EXPECT_TRUE(game.IsValidPlugin(path)); } TEST_P(