19 lines
441 B
Haxe
Raw Normal View History

2025-01-22 16:18:30 +01:00
import haxe.PosInfos;
class TestBase extends haxe.unit.TestCase
{
public function assertClose(inWant:Float, inGot:Float, ?c : PosInfos )
{
assertTrue( Math.abs(inWant-inGot) < 0.001, c );
}
public function assertEq<T>(inWant:T, inGot:T, ?c : PosInfos )
{
var same = inWant==inGot;
if (!same)
trace('Expected $inWant, got $inGot');
assertTrue(same, c);
}
}