UnittestAux RΒΆ
unittest.spad line 377 [edit on github]
R: BasicType
UnittestAux is an auxiliary package to Unittest, that performs checking of tests, dealing also with fatal errors.
- testAbsolutePrecision: R -> R if R has RealNumberSystem
testAbsolutePrecision(eps)
returns the current absolute precision used for floating point comparison, and then sets it toeps
. The default value is 1.0e-15.
- testComplexEqualsAux: (String, Complex R, Complex R) -> Void if R has RealNumberSystem
testComplexEqualsAux(inp ex1, ex2)
states thatex1
andex2
should be approximately equal as complex numbers, taking into acount testAbsolutePrecision and testRelativePrecision.
- testEqualsAux: (String, R, R) -> Void
testEqualsAux(inp, 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.
- testEqualsAuxCmp: (R, R) -> Boolean
testEqualsAuxCmp should
be local but is conditional
- testLibraryErrorAux: (String, R) -> Void
testLibraryErrorAux(inp, ex)
states that ex should throw an error. Such a test will never count as a fatal error.
- testNotEqualsAux: (String, R, R) -> Void
testNotEqualsAux(inp, ex1, ex2)
states thatex1
andex2
should be different.
- testRealEqualsAux: (String, R, R) -> Void if R has RealNumberSystem
testRealEqualsAux(inp, ex1, ex2)
states thatex1
andex2
should be approximately equal as real numbers, taking into acount testAbsolutePrecision and testRelativePrecision.
- testRelativePrecision: R -> R if R has RealNumberSystem
testRelativePrecision(eps)
returns the current absolute precision used for floating point comparison, and then sets it toeps
. The default value is 1.0e-15.
- xftestComplexEqualsAux: (String, Complex R, Complex R) -> Void if R has RealNumberSystem
xftestComplexEqualsAux is like testComplexEqualsAux, but expects failure.
- xftestLibraryErrorAux: (String, R) -> Void
xftestLibraryErrorAux like
testLibraryErrorAux, but expects failure (that is no error).
- xftestNotEqualsAux: (String, R, R) -> Void
xftestNotEqualsAux is like testEquals, but expects failure.
- xftestRealEqualsAux: (String, R, R) -> Void if R has RealNumberSystem
xftestRealEqualsAux is like testRealEqualsAux, but expects failure.