MCPcopy Create free account
hub / github.com/axmolengine/axmol / run

Method run

templates/cpp/Source/AppDelegate.cpp:119–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117
118#if _AX_TESTS
119int AppDelegate::run(int argc, char** argv) {
120 AXLOGI("Running unit tests...\n");
121 fflush(stdout);
122 AXLOGI("Default resource path: {}\n", FileUtils::getInstance()->getDefaultResourceRootPath());
123 AXLOGI("Writable path: {}\n", FileUtils::getInstance()->getWritablePath());
124 {
125 for (auto& path : FileUtils::getInstance()->getSearchPaths())
126 AXLOGI("Search path: {}\n", path);
127 }
128 fflush(stdout);
129
130 ax::Director::getInstance()->init();
131
132 doctest::Context context;
133
134 //context.addFilter("test-case-exclude", "*math*"); // exclude test cases with "math" in their name
135 //context.setOption("abort-after", 5); // stop test execution after 5 failed assertions
136
137 //context.setOption("order-by", "name"); // sort the test cases by their name
138
139 context.applyCommandLine(argc, argv);
140
141 // overrides
142 context.setOption("no-breaks", true); // don't break in the debugger when assertions fail
143
144 int res = context.run(); // run
145 return res;
146}
147#endif

Callers 7

axmol_mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
axmol_mainFunction · 0.45
mainFunction · 0.45
axmol_mainFunction · 0.45
mainFunction · 0.45

Calls 6

getInstanceFunction · 0.85
getSearchPathsMethod · 0.80
applyCommandLineMethod · 0.80
setOptionMethod · 0.80
getWritablePathMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected