| 115 | // ============================================================================ |
| 116 | |
| 117 | RunOptions parse_args(int argc, const char** argv) { |
| 118 | RunOptions opts; |
| 119 | |
| 120 | for (int i = 1; i < argc; i++) { |
| 121 | fl::string arg = argv[i]; |
| 122 | |
| 123 | if (arg == "--success") { |
| 124 | opts.show_success = true; |
| 125 | } else if (arg == "--no-colors") { |
| 126 | opts.no_colors = true; |
| 127 | } else if (arg == "-r" || arg == "--reporters") { |
| 128 | if (i + 1 < argc) { |
| 129 | opts.reporter = argv[++i]; |
| 130 | } |
| 131 | } else if (arg == "-tc" || arg == "--test-case") { |
| 132 | if (i + 1 < argc) { |
| 133 | opts.test_filter = argv[++i]; |
| 134 | } |
| 135 | } else if (arg.find("--test-case=") == 0) { |
| 136 | // Handle --test-case=value format |
| 137 | opts.test_filter = arg.substr(12); |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | return opts; |
| 142 | } |
| 143 | |
| 144 | // ============================================================================ |
| 145 | // Test Runner |
no test coverage detected