forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
18
Kha/Backends/Kinc-hxcpp/khacpp/test/cffi/src/TestBase.hx
Normal file
18
Kha/Backends/Kinc-hxcpp/khacpp/test/cffi/src/TestBase.hx
Normal file
@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user