2
0
Эх сурвалжийг харах

[benchs] print an error if a requested case does not exist

Alexander Kuzmenko 6 жил өмнө
parent
commit
002502d4a6

+ 4 - 0
tests/benchs/src/Macro.hx

@@ -50,6 +50,10 @@ class Macro {
 			}
 		}
 		loop(pack.split('.'));
+		if(cases.length == 0) {
+			Sys.stderr().writeString('${Context.definedValue("test")} not found.\n');
+			Sys.exit(1);
+		}
 		return macro $a{cases};
 	}
 }