|
@@ -6,12 +6,22 @@ class Main {
|
|
|
var cases = Macro.getCases("cases");
|
|
|
var printer = new ResultPrinter();
|
|
|
function print(result:SuiteResult) {
|
|
|
- Sys.println(printer.print(result));
|
|
|
+ println(printer.print(result));
|
|
|
}
|
|
|
|
|
|
for (benchCase in cases) {
|
|
|
- Sys.println('Case: ${benchCase.name}');
|
|
|
+ println('Case: ${benchCase.name}');
|
|
|
benchCase.exec.run(print);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ static public inline function println(msg:String) {
|
|
|
+ #if sys
|
|
|
+ Sys.println(msg);
|
|
|
+ #elseif js
|
|
|
+ js.Syntax.code('console.log({0})', msg);
|
|
|
+ #else
|
|
|
+ trace(msg);
|
|
|
+ #end
|
|
|
+ }
|
|
|
}
|