Browse Source

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

Alexander Kuzmenko 6 năm trước cách đây
mục cha
commit
002502d4a6
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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};
 	}
 }