TAssert
A set of assert methods.
Messages are only displayed when an assert fails.
Functions
Function assertTrue(bool:Int, message:String = Null)
Asserts that a condition is True.
If it isn't True, it throws an AssertionFailedException with the given message.
Function assertFalse(bool:Int, message:String = Null)
Asserts that a condition is False.
If it isn't False, it throws an AssertionFailedException with the given message.
Function fail(message:String)
Fails a test with the given message.
Function assertEquals(expected:Object, actual:Object, message:String = Null)
Asserts that two objects are equal.
If they are not equal, an AssertionFailedException is thrown with the given message.
Function assertEqualsI(expected:Int, actual:Int, message:String = Null)
Asserts that two ints are equal.
If they are not equal, an AssertionFailedException is thrown with the given message.
Function assertEqualsL(expected:Long, actual:Long, message:String = Null)
Asserts that two longs are equal.
If they are not equal an AssertionFailedException is thrown with the given message.
Function assertEqualsF(expected:Float, actual:Float, delta:Float = 0, message:String = Null)
Asserts that two floats are equal.
If they are not equal, an AssertionFailedException is thrown with the given message.
Function assertEqualsD(expected:Double, actual:Double, delta:Double = 0, message:String = Null)
Asserts that two doubles are equal.
If they are not equal, an AssertionFailedException is thrown with the given message.
Function assertEqualsS(expected:Short, actual:Short, message:String = Null)
Asserts that two shorts are equal.
If they are not equal, an AssertionFailedException is thrown with the given message.
Function assertEqualsB(expected:Byte, actual:Byte, message:String = Null)
Asserts that two bytes are equal.
If they are not equal, an AssertionFailedException is thrown with the given message.
Function assertNotNull(obj:Object, message:String = Null)
Asserts that an object isn't Null.
If it is Null, an AssertionFailedException is thrown with the given message.
Function assertNotNull(value:Byte Ptr, message:String = Null)
Asserts that a pointer isn't Null.
If it is Null, an AssertionFailedException is thrown with the given message.
Function assertNull(obj:Object, message:String = Null)
Asserts that an Object is Null.
If it is not Null, an AssertionFailedException is thrown with the given message.
Function assertSame(expected:Object, actual:Object, message:String = Null)
Asserts that two objects refer to the same Object.
If they are not the same, an AssertionFailedException is thrown with the given message.
Function assertNull(value:Byte Ptr, message:String = Null)
Asserts that an pointer is Null.
If it is not Null, an AssertionFailedException is thrown with the given message.
Function assertNotSame(expected:Object, actual:Object, message:String = Null)
Asserts that two objects refer to different objects.
If they are the same, an AssertionFailedException is thrown with the given message.
Function assertEquals(expected:UInt, actual:UInt, message:String = Null)
Asserts that two UInts are equal.
If they are not equal, an AssertionFailedException is thrown with the given message.
Function assertEquals(expected:ULong, actual:ULong, message:String = Null)
Asserts that two ULongs are equal.
If they are not equal, an AssertionFailedException is thrown with the given message.
Function assertEquals(expected:Size_T, actual:Size_T, message:String = Null)
Asserts that two Size_Ts are equal.
If they are not equal, an AssertionFailedException is thrown with the given message.
