MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / setDemoName

Method setDemoName

Source/UnitTesting.cpp:66–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void cUnitTesting::setDemoName() {
67 // Set demo file name
68 g_Fodder->mStartParams->mDemoFile = g_ResourceMan->GetTestPath(g_Fodder->mVersionCurrent, g_Fodder->mStartParams->mCampaignName) + "/" + getCurrentTestFileName();
69 if (!g_ResourceMan->FileExists(g_Fodder->mStartParams->mDemoFile + ".ofd")) {
70
71 bool AmigaExists = g_ResourceMan->FileExists(g_Fodder->mStartParams->mDemoFile + "-amiga.ofd");
72 bool PcExists = g_ResourceMan->FileExists(g_Fodder->mStartParams->mDemoFile + "-pc.ofd");
73
74 // If we a PC or Amiga specific test exists, then use it as the name
75 if (AmigaExists || PcExists) {
76
77 if (g_Fodder->mVersionCurrent->isAmiga()) {
78 g_Fodder->mStartParams->mDemoFile += "-amiga";
79 } else {
80 g_Fodder->mStartParams->mDemoFile += "-pc";
81 }
82 }
83 }
84
85 g_Fodder->mStartParams->mDemoFile += ".ofd";
86}
87
88bool cUnitTesting::RunTests(const std::string pCampaign) {
89 bool Retry = false;

Callers

nothing calls this directly

Calls 3

GetTestPathMethod · 0.80
FileExistsMethod · 0.80
isAmigaMethod · 0.80

Tested by

no test coverage detected