Ver Fonte

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

Alexander Kuzmenko há 6 anos atrás
pai
commit
002502d4a6
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      tests/benchs/src/Macro.hx

+ 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};
 	}
 }