eris.decimal.test

Test routines for floating-point decimal arithmetic.

An implementation of the General Decimal Arithmetic Specification.

Members

Functions

assertEqual
bool assertEqual(T actual, T expected, size_t index, string file, int line)

Returns true if the actual value equals the expected value. Otherwise prints an error message and returns false.

assertEqual
bool assertEqual(T actual, U expected, size_t index, string file, int line)

Returns true if the actual value equals the expected value. Otherwise prints an error message and returns false.

assertFalse
bool assertFalse(T actual, string file, int line)

Returns true if the actual value is false. Otherwise prints an error message and returns false.

assertGreaterThan
bool assertGreaterThan(T first, U second, string file, int line)

Returns true if the first value is greater than the second value. Otherwise prints an error message and returns false.

assertLessThan
bool assertLessThan(T first, U second, string file, int line)

Returns true if the first value is less than the second value. Otherwise prints an error message and returns false.

assertNegative
bool assertNegative(T actual, string file, int line)

Returns true if the value is less than zero. Otherwise prints an error message and returns false.

assertNotEqual
bool assertNotEqual(T actual, U expected, string file, int line)
Undocumented in source. Be warned that the author may not have intended to support it.
assertNotGreaterThan
bool assertNotGreaterThan(T first, U second, string file, int line)

Returns true if the first value is greater than the second value. Otherwise prints an error message and returns false.

assertNotLessThan
bool assertNotLessThan(T first, U second, string file, int line)

Returns true if the first value is less than the second value. Otherwise prints an error message and returns false.

assertPositive
bool assertPositive(T actual, string file, int line)

Returns true if the value is greater than or equal to zero. Otherwise prints an error message and returns false.

assertStringEqual
bool assertStringEqual(T actual, U expected, string file, int line)

Returns true if the string representation of the actual value equals the string representation of the expected value. Otherwise prints an error message and returns false.

assertStringEqual
bool assertStringEqual(T actual, U expected, string file, int line)

Returns true if the string representation of the actual value equals the string representation of the expected value. Otherwise prints an error message and returns false.

assertStringNotEqual
bool assertStringNotEqual(T actual, U expected, string file, int line)

Returns true if the string representation of the actual value equals the string representation of the expected value. Otherwise prints an error message and returns false.

assertThrows
bool assertThrows(E expression, string msg, string file, int line)

Returns true if the expression throws.

assertTrue
bool assertTrue(T actual, string file, int line)

Returns true if the actual value is true. Otherwise prints an error message and returns false.

assertZero
bool assertZero(T actual, string file, int line)

Returns true if the value is zero. Otherwise prints an error message and returns false.

Static variables

initialized
bool initialized;
Undocumented in source.
totalFail
int totalFail;
Undocumented in source.
totalPass
int totalPass;
Undocumented in source.
totalTests
int totalTests;
Undocumented in source.

Structs

FunctionTest
struct FunctionTest(S, T, string fmt = "%s", int N = S.tupleof.length - 1)

S is a struct containing input data and the expected value T is the return type of the function being tested N is the number of inputs

Meta

Authors

Paul D. Anderson

Standards

Conforms to the General Decimal Arithmetic Specification, Version 1.70, (25 March 2009).

License

<a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>