From 4eb84e5c325c4de4ca05dfbd6b02d773060a2776 Mon Sep 17 00:00:00 2001 From: Andy Li Date: Fri, 11 May 2018 10:48:14 +0800 Subject: [PATCH] better pos info in test --- Test.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Test.hx b/Test.hx index 029fd5f..866d26a 100644 --- a/Test.hx +++ b/Test.hx @@ -7,7 +7,7 @@ import hscript.Printer; import haxe.unit.*; class Test extends TestCase { - function assertScript(x,v:Dynamic,?vars : Dynamic,allowTypes=false) { + function assertScript(x,v:Dynamic,?vars : Dynamic, allowTypes=false, ?pos:haxe.PosInfos) { var p = new hscript.Parser(); p.allowTypes = allowTypes; var program = p.parseString(x); @@ -18,7 +18,7 @@ class Test extends TestCase { for( v in Reflect.fields(vars) ) interp.variables.set(v,Reflect.field(vars,v)); var ret : Dynamic = interp.execute(program); - assertEquals(v, ret); + assertEquals(v, ret, pos); } function test():Void {