test/doc/examples/example84_contexts.output
Raffi Enficiaud 1cf1503b23 Making BOOST_TEST_CONTEXT variadic and adding sticky context
To ease the creation of contexts, variadic let us declare several
values in one call (no extra brace) while ticky context let us
add new information while they arrive.

The example shows a random trial making a test fail. We force the failure
for the unit tests, which does not remove the documentation value of the
example.
2019-02-12 01:04:00 +01:00

24 lines
907 B
Plaintext

//[example_output
> example --log_level=message
Seed = 162981956
test.cpp(34): error: in "quadratic_estimation": check minus_b * minus_b >= 4*c has failed [-13.999999999999998 * -13.999999999999998 < 195.99999999999997]
Failure occurred in a following context:
trial 14
root1 = -7
root2 = -7
sample1 = 4.66289
sample2 = 1.70234
test.cpp(64): error: in "quadratic_estimation": check estimated.first == double(root1) has failed [-nan != -7]. Relative difference exceeds tolerance [-nan > 0.1]
Failure occurred in a following context:
trial 14
root1 = -7
root2 = -7
test.cpp(65): error: in "quadratic_estimation": check estimated.second == double(root2) has failed [-nan != -7]. Relative difference exceeds tolerance [-nan > 0.1]
Failure occurred in a following context:
trial 14
root1 = -7
root2 = -7
*** 3 failures are detected in the test module "example84"
//]