浏览代码

timestamp unit tests

Simon Krajewski 12 年之前
父节点
当前提交
ef493d3717
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 3 0
      tests/unit/Test.hx
  2. 4 0
      tests/unit/TestType.hx

+ 3 - 0
tests/unit/Test.hx

@@ -209,6 +209,9 @@ class Test #if swf_mark implements mt.Protect #end {
 			php.Web.setHeader("Content-Type","text/plain");
 			php.Web.setHeader("Content-Type","text/plain");
 		#end
 		#end
 		resetTimer();
 		resetTimer();
+		#if !macro
+		trace("Generated at: " + TestType.getCompilationDate());
+		#end
 		trace("START");
 		trace("START");
 		#if flash9
 		#if flash9
 		var tf : flash.text.TextField = untyped flash.Boot.getTrace();
 		var tf : flash.text.TextField = untyped flash.Boot.getTrace();

+ 4 - 0
tests/unit/TestType.hx

@@ -12,6 +12,10 @@ class TestType extends Test {
 		#end
 		#end
 	}
 	}
 
 
+	static public macro function getCompilationDate() {
+		return macro $v { Std.string(Date.now()) };
+	}
+	
 	static public macro function typedAs(actual:haxe.macro.Expr, expected:haxe.macro.Expr) {
 	static public macro function typedAs(actual:haxe.macro.Expr, expected:haxe.macro.Expr) {
 		var tExpected = haxe.macro.Context.typeof(expected);
 		var tExpected = haxe.macro.Context.typeof(expected);
 		var tActual = haxe.macro.Context.typeof(actual);
 		var tActual = haxe.macro.Context.typeof(actual);