MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetReplayFiles

Function GetReplayFiles

test/tests/ReplayTests.cpp:46–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46static std::vector<ReplayTestData> GetReplayFiles()
47{
48 std::vector<ReplayTestData> res;
49 std::string basePath = TestData::GetBasePath();
50 std::string replayPath = Path::Combine(basePath, u8"replays");
51 std::string replayPathPattern = Path::Combine(replayPath, u8"*.parkrep");
52 std::vector<std::string> files;
53
54 auto scanner = Path::ScanDirectory(replayPathPattern, true);
55 while (scanner->Next())
56 {
57 ReplayTestData test;
58 test.name = sanitizeTestName(scanner->GetFileInfo().Name);
59 test.filePath = Path::GetAbsolute(scanner->GetPath());
60 res.push_back(std::move(test));
61 }
62 return res;
63}
64
65class ReplayTests : public testing::TestWithParam<ReplayTestData>
66{

Callers 1

ReplayTests.cppFile · 0.85

Calls 7

GetBasePathFunction · 0.85
sanitizeTestNameFunction · 0.85
GetAbsoluteFunction · 0.85
NextMethod · 0.80
CombineFunction · 0.50
GetPathMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected