| 117 | |
| 118 | #if _AX_TESTS |
| 119 | int 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 |
no test coverage detected