UnittestAux RΒΆ

unittest.spad line 377 [edit on github]

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 to eps. The default value is 1.0e-15.

testComplexEqualsAux: (String, Complex R, Complex R) -> Void if R has RealNumberSystem

testComplexEqualsAux(inp ex1, ex2) states that ex1 and ex2 should be approximately equal as complex numbers, taking into account testAbsolutePrecision and testRelativePrecision.

testEqualsAux: (String, R, R) -> Void

testEqualsAux(inp, ex1, ex2) states that ex1 and ex2 should be equal. To sidestep the possibility that the equality function of the domain R performs some simplifications, we convert ex1 and ex2 to InputForm, 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 that ex1 and ex2 should be different.

testRealEqualsAux: (String, R, R) -> Void if R has RealNumberSystem

testRealEqualsAux(inp, ex1, ex2) states that ex1 and ex2 should be approximately equal as real numbers, taking into account 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 to eps. The default value is 1.0e-15.

testTrueAux: (String, R) -> Void

testTrueAux(inp, ex) states that ex should be true.

xftestComplexEqualsAux: (String, Complex R, Complex R) -> Void if R has RealNumberSystem

xftestComplexEqualsAux is like testComplexEqualsAux, but expects failure.

xftestEqualsAux: (String, R, R) -> Void

xftestEqualsAux is like testEquals, 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.

xftestTrueAux: (String, R) -> Void

xftestTrueAux is like testTrueAux, but expects failure.