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

Function sanitizeTestName

test/tests/ReplayTests.cpp:34–44  ·  view source on GitHub ↗

NOTE: gtests expects the name to have no special characters.

Source from the content-addressed store, hash-verified

32
33// NOTE: gtests expects the name to have no special characters.
34static std::string sanitizeTestName(const std::string& name)
35{
36 std::string nameOnly = Path::GetFileNameWithoutExtension(name);
37 std::string res;
38 for (char c : nameOnly)
39 {
40 if (isalnum(static_cast<unsigned char>(c)))
41 res += c;
42 }
43 return res;
44}
45
46static std::vector<ReplayTestData> GetReplayFiles()
47{

Callers 1

GetReplayFilesFunction · 0.85

Calls 1

Tested by

no test coverage detected