MCPcopy Create free account
hub / github.com/FastLED/FastLED / parse_args

Function parse_args

tests/shared/fl_unittest.cpp:117–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115// ============================================================================
116
117RunOptions 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

Callers 2

fl_run_testsFunction · 0.50
fl_mainFunction · 0.50

Calls 2

findMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected