UnittestΒΆ
unittest.spad line 617 [edit on github]
Unittest is a package that provides functions for regression testing. Note that it calls the interpreter, thus, all functions require that their arguments be passed as strings.
- testComplexEquals: (String, String) -> Void
testComplexEquals(ex1, ex2)
states thatex1
andex2
should be approximately equal as complex numbers, taking into acount testAbsolutePrecision and testRelativePrecision.
- testEquals: (String, String) -> Void
testEquals(ex1, ex2)
states thatex1
andex2
should be equal. To sidestep the possibility that the equality function of the domainR
performs some simplifications, we convertex1
andex2
toInputForm
, if possible.
- testLibraryError: String -> Void
testLibraryError ex
states that ex should throw an error. Such a test will never count as a fatal error.
- testNotEquals: (String, String) -> Void
testNotEquals(ex1, ex2)
states thatex1
andex2
should be different.
- testRealEquals: (String, String) -> Void
testRealEquals(ex1, ex2)
states thatex1
andex2
should be approximately equal as real numbers, taking into acount testAbsolutePrecision and testRelativePrecision.
- xftestComplexEquals: (String, String) -> Void
xftestComplexEquals is like testComplexEquals, but expects failure.
- xftestNotEquals: (String, String) -> Void
xftestNotEquals is like testNotEquals, but expects failure.