eliminated BOOST_CHECK on context description page; normalized all examples output to test.cpp(nn):
This commit is contained in:
parent
8716300874
commit
1a3893dae0
@ -2,19 +2,19 @@
|
||||
> ./boost_test_bitwise --log_level=all
|
||||
Running 1 test case...
|
||||
Entering test module "boost_test_bitwise"
|
||||
boost_test_bitwise.cpp:13: Entering test case "test_bitwise"
|
||||
boost_test_bitwise.cpp:17: error: in "test_bitwise": check a == (a & ~1) has failed [171 != 170]. Bitwise comparison failed
|
||||
test.cpp(13): Entering test case "test_bitwise"
|
||||
test.cpp(17): error: in "test_bitwise": check a == (a & ~1) has failed [171 != 170]. Bitwise comparison failed
|
||||
Mismatch at position 0
|
||||
boost_test_bitwise.cpp:18: error: in "test_bitwise": check a == a + 1 has failed [171 != 172]. Bitwise comparison failed
|
||||
test.cpp(18): error: in "test_bitwise": check a == a + 1 has failed [171 != 172]. Bitwise comparison failed
|
||||
Mismatch at position 0
|
||||
Mismatch at position 1
|
||||
Mismatch at position 2
|
||||
boost_test_bitwise.cpp:19: info: check a != a + 1 has passed
|
||||
boost_test_bitwise.cpp:21: error: in "test_bitwise": check a == b has failed [171 != 136]. Bitwise comparison failed
|
||||
test.cpp(19): info: check a != a + 1 has passed
|
||||
test.cpp(21): error: in "test_bitwise": check a == b has failed [171 != 136]. Bitwise comparison failed
|
||||
Mismatch at position 0
|
||||
Mismatch at position 1
|
||||
Mismatch at position 5
|
||||
boost_test_bitwise.cpp:13: Leaving test case "test_bitwise"; testing time: 627mks
|
||||
test.cpp(13): Leaving test case "test_bitwise"; testing time: 627mks
|
||||
Leaving test module "boost_test_bitwise"; testing time: 772mks
|
||||
|
||||
*** 3 failures are detected in the test module "boost_test_bitwise"
|
||||
|
@ -2,11 +2,11 @@
|
||||
> ./boost_test_container_default --log_level=all
|
||||
Running 1 test case...
|
||||
Entering test module "boost_test_sequence"
|
||||
boost_test_container_default.cpp:13: Entering test case "test_collections_vectors"
|
||||
boost_test_container_default.cpp:23: info: check a < c has passed
|
||||
boost_test_container_default.cpp:24: error: in "test_collections_vectors": check a >= c has failed
|
||||
boost_test_container_default.cpp:25: info: check a != c has passed
|
||||
boost_test_container_default.cpp:13: Leaving test case "test_collections_vectors"; testing time: 208mks
|
||||
test.cpp(13): Entering test case "test_collections_vectors"
|
||||
test.cpp(23): info: check a < c has passed
|
||||
test.cpp(24): error: in "test_collections_vectors": check a >= c has failed
|
||||
test.cpp(25): info: check a != c has passed
|
||||
test.cpp(13): Leaving test case "test_collections_vectors"; testing time: 208mks
|
||||
Leaving test module "boost_test_sequence"; testing time: 286mks
|
||||
|
||||
*** 1 failure is detected in the test module "boost_test_container_default"
|
||||
|
@ -2,15 +2,15 @@
|
||||
> ./boost_test_container_lex --log_level=all
|
||||
Running 1 test case...
|
||||
Entering test module "boost_test_container_lex"
|
||||
boost_test_container_lex.cpp:15: Entering test case "test_collections_vectors_lex"
|
||||
boost_test_container_lex.cpp:19: error: in "test_collections_vectors_lex": check a < a has failed
|
||||
test.cpp(15): Entering test case "test_collections_vectors_lex"
|
||||
test.cpp(19): error: in "test_collections_vectors_lex": check a < a has failed
|
||||
Collections appear to be equal.
|
||||
boost_test_container_lex.cpp:20: error: in "test_collections_vectors_lex": check a < b has failed
|
||||
test.cpp(20): error: in "test_collections_vectors_lex": check a < b has failed
|
||||
Failure at position 2: 3 >= 2.
|
||||
boost_test_container_lex.cpp:21: info: check a < c has passed
|
||||
boost_test_container_lex.cpp:22: error: in "test_collections_vectors_lex": check a >= c has failed
|
||||
test.cpp(21): info: check a < c has passed
|
||||
test.cpp(22): error: in "test_collections_vectors_lex": check a >= c has failed
|
||||
Second collection has extra trailing elements.
|
||||
boost_test_container_lex.cpp:15: Leaving test case "test_collections_vectors_lex"; testing time: 267mks
|
||||
test.cpp(15): Leaving test case "test_collections_vectors_lex"; testing time: 267mks
|
||||
Leaving test module "boost_test_container_lex"; testing time: 341mks
|
||||
|
||||
*** 3 failures are detected in the test module "boost_test_container_lex"
|
||||
|
@ -2,15 +2,15 @@
|
||||
> ./boost_test_macro1 --log_level=all
|
||||
Running 2 test cases...
|
||||
Entering test module "boost_test_macro1"
|
||||
boost_test_macro1.cpp:13: Entering test case "test_basic_operations"
|
||||
boost_test_macro1.cpp:17: info: check a == b has passed
|
||||
boost_test_macro1.cpp:18: info: check a < b + 1 has passed
|
||||
boost_test_macro1.cpp:19: info: check b >= a has passed
|
||||
boost_test_macro1.cpp:20: info: check !(b >= b + 1) has passed
|
||||
boost_test_macro1.cpp:13: Leaving test case "test_basic_operations"; testing time: 324mks
|
||||
boost_test_macro1.cpp:23: Entering test case "test_logical_not_allowed"
|
||||
boost_test_macro1.cpp:25: info: check true has passed
|
||||
boost_test_macro1.cpp:23: Leaving test case "test_logical_not_allowed"; testing time: 113mks
|
||||
test.cpp(13): Entering test case "test_basic_operations"
|
||||
test.cpp(17): info: check a == b has passed
|
||||
test.cpp(18): info: check a < b + 1 has passed
|
||||
test.cpp(19): info: check b >= a has passed
|
||||
test.cpp(20): info: check !(b >= b + 1) has passed
|
||||
test.cpp(13): Leaving test case "test_basic_operations"; testing time: 324mks
|
||||
test.cpp(23): Entering test case "test_logical_not_allowed"
|
||||
test.cpp(25): info: check true has passed
|
||||
test.cpp(23): Leaving test case "test_logical_not_allowed"; testing time: 113mks
|
||||
Leaving test module "boost_test_macro1"; testing time: 643mks
|
||||
|
||||
*** No errors detected
|
||||
|
@ -1,10 +1,10 @@
|
||||
//[example_output
|
||||
> ./boost_test_macro2 --log_level=all
|
||||
Running 2 test cases...
|
||||
boost_test_macro2.cpp:16: error: in "test_op_precedence": check a % b == c has failed [13 % 2 != 12]
|
||||
boost_test_macro2.cpp:18: error: in "test_op_precedence": check a == c % b has failed [13 != 0]
|
||||
boost_test_macro2.cpp:25: error: in "test_op_right_associative": check !a has failed
|
||||
boost_test_macro2.cpp:26: error: in "test_op_right_associative": check --a has failed [(bool)0 is false]
|
||||
test.cpp(16): error: in "test_op_precedence": check a % b == c has failed [13 % 2 != 12]
|
||||
test.cpp(18): error: in "test_op_precedence": check a == c % b has failed [13 != 0]
|
||||
test.cpp(25): error: in "test_op_right_associative": check !a has failed
|
||||
test.cpp(26): error: in "test_op_right_associative": check --a has failed [(bool)0 is false]
|
||||
|
||||
*** 4 failures are detected in the test module "boost_test_macro2"
|
||||
//]
|
||||
|
@ -2,12 +2,12 @@
|
||||
> ./boost_test_macro3 --log_level=all
|
||||
Running 1 test case...
|
||||
Entering test module "boost_test_macro3"
|
||||
boost_test_macro3.cpp:12: Entering test case "test_op_reportings"
|
||||
boost_test_macro3.cpp:15: error: in "test_op_reportings": check a == b has failed [13 != 12]
|
||||
boost_test_macro3.cpp:16: error: in "test_op_reportings": check a < b has failed [13 >= 12]
|
||||
boost_test_macro3.cpp:17: error: in "test_op_reportings": check a - 1 < b has failed [13 - 1 >= 12]
|
||||
boost_test_macro3.cpp:18: error: in "test_op_reportings": check b > a - 1 has failed [12 <= 12]
|
||||
boost_test_macro3.cpp:12: Leaving test case "test_op_reportings"; testing time: 484mks
|
||||
test.cpp(12): Entering test case "test_op_reportings"
|
||||
test.cpp(15): error: in "test_op_reportings": check a == b has failed [13 != 12]
|
||||
test.cpp(16): error: in "test_op_reportings": check a < b has failed [13 >= 12]
|
||||
test.cpp(17): error: in "test_op_reportings": check a - 1 < b has failed [13 - 1 >= 12]
|
||||
test.cpp(18): error: in "test_op_reportings": check b > a - 1 has failed [12 <= 12]
|
||||
test.cpp(12): Leaving test case "test_op_reportings"; testing time: 484mks
|
||||
Leaving test module "boost_test_macro3"; testing time: 588mks
|
||||
|
||||
*** 2 failures are detected in the test module "boost_test_macro3"
|
||||
|
@ -2,9 +2,9 @@
|
||||
> ./boost_test_macro_container_c_array --log_level=all
|
||||
Running 1 test case...
|
||||
Entering test module "boost_test_container_c"
|
||||
boost_test_macro_container_c_array.cpp:15: Entering test case "test_collections_not_on_c_arrays"
|
||||
boost_test_macro_container_c_array.cpp:19: error: in "test_collections_not_on_c_arrays": check a == b has failed [0x7fff526e5bc4 != 0x7fff526e5bb0]
|
||||
boost_test_macro_container_c_array.cpp:15: Leaving test case "test_collections_not_on_c_arrays"; testing time: 323mks
|
||||
test.cpp(15): Entering test case "test_collections_not_on_c_arrays"
|
||||
test.cpp(19): error: in "test_collections_not_on_c_arrays": check a == b has failed [0x7fff526e5bc4 != 0x7fff526e5bb0]
|
||||
test.cpp(15): Leaving test case "test_collections_not_on_c_arrays"; testing time: 323mks
|
||||
Leaving test module "boost_test_container_c"; testing time: 526mks
|
||||
|
||||
*** 1 failure is detected in the test module "boost_test_container_c"
|
||||
|
@ -1,7 +1,7 @@
|
||||
Running 1 test case...
|
||||
/Users/raffi/Personnel/boost_github/libs/test/doc/examples/boost_test_macro_sequence.cpp:18: error: in "test_collections_vectors": check a == b has failed.
|
||||
test.cpp(18): error: in "test_collections_vectors": check a == b has failed.
|
||||
Mismatch at position 1: 2 != 5.
|
||||
/Users/raffi/Personnel/boost_github/libs/test/doc/examples/boost_test_macro_sequence.cpp:22: error: in "test_collections_vectors": check b >= c has failed.
|
||||
test.cpp(22): error: in "test_collections_vectors": check b >= c has failed.
|
||||
Second collection has extra trailing elements.
|
||||
|
||||
*** 2 failures are detected in the test module "boost_test_sequence"
|
||||
|
@ -2,10 +2,10 @@
|
||||
> ./boost_test_message --log_level=all
|
||||
Running 1 test case...
|
||||
Entering test module "boost_test_message"
|
||||
boost_test_message.cpp:12: Entering test case "test_message"
|
||||
boost_test_message.cpp:15: error: in "test_message": a should be equal to b: 1!=2
|
||||
boost_test_message.cpp:16: info: check 'value of a=1' has passed
|
||||
boost_test_message.cpp:12: Leaving test case "test_message"; testing time: 219mks
|
||||
test.cpp(12): Entering test case "test_message"
|
||||
test.cpp(15): error: in "test_message": a should be equal to b: 1!=2
|
||||
test.cpp(16): info: check 'value of a=1' has passed
|
||||
test.cpp(12): Leaving test case "test_message"; testing time: 219mks
|
||||
Leaving test module "boost_test_message"; testing time: 318mks
|
||||
|
||||
*** 1 failure is detected in the test module "boost_test_message"
|
||||
|
@ -1,16 +1,16 @@
|
||||
//[example_output
|
||||
> ./boost_test_sequence_per_element
|
||||
Running 1 test case...
|
||||
boost_test_sequence_per_element.cpp:21: error: in "test_sequence_per_element": check a == b has failed
|
||||
test.cpp(21): error: in "test_sequence_per_element": check a == b has failed
|
||||
Mismatch at position 1: 2 != 5.
|
||||
boost_test_sequence_per_element.cpp:23: error: in "test_sequence_per_element": check a != b has failed
|
||||
test.cpp(23): error: in "test_sequence_per_element": check a != b has failed
|
||||
Mismatch at position 0: 1 == 1.
|
||||
Mismatch at position 2: 3 == 3.
|
||||
boost_test_sequence_per_element.cpp:25: error: in "test_sequence_per_element": check b < c has failed
|
||||
test.cpp(25): error: in "test_sequence_per_element": check b < c has failed
|
||||
Collections size mismatch: 3 != 4
|
||||
boost_test_sequence_per_element.cpp:26: error: in "test_sequence_per_element": check b >= c has failed
|
||||
test.cpp(26): error: in "test_sequence_per_element": check b >= c has failed
|
||||
Collections size mismatch: 3 != 4
|
||||
boost_test_sequence_per_element.cpp:27: error: in "test_sequence_per_element": check b != c has failed
|
||||
test.cpp(27): error: in "test_sequence_per_element": check b != c has failed
|
||||
Collections size mismatch: 3 != 4
|
||||
|
||||
*** 5 failures are detected in the test module "boost_test_sequence_per_element"
|
||||
|
@ -2,14 +2,14 @@
|
||||
> ./boost_test_strings --log_level=all
|
||||
Running 2 test cases...
|
||||
Entering test module "boost_test_strings"
|
||||
boost_test_strings.cpp:15: Entering test case "test_pointers"
|
||||
boost_test_strings.cpp:19: info: check a == b has passed
|
||||
boost_test_strings.cpp:20: error: in "test_pointers": check pa == pb has failed [0x7fff51cdcc04 != 0x7fff51cdcc00]
|
||||
boost_test_strings.cpp:15: Leaving test case "test_pointers"; testing time: 306mks
|
||||
boost_test_strings.cpp:23: Entering test case "test_strings"
|
||||
boost_test_strings.cpp:28: error: in "test_strings": check a == b has failed [test1 != test2]
|
||||
boost_test_strings.cpp:29: info: check a == c has passed
|
||||
boost_test_strings.cpp:23: Leaving test case "test_strings"; testing time: 198mks
|
||||
test.cpp(15): Entering test case "test_pointers"
|
||||
test.cpp(19): info: check a == b has passed
|
||||
test.cpp(20): error: in "test_pointers": check pa == pb has failed [0x7fff51cdcc04 != 0x7fff51cdcc00]
|
||||
test.cpp(15): Leaving test case "test_pointers"; testing time: 306mks
|
||||
test.cpp(23): Entering test case "test_strings"
|
||||
test.cpp(28): error: in "test_strings": check a == b has failed [test1 != test2]
|
||||
test.cpp(29): info: check a == c has passed
|
||||
test.cpp(23): Leaving test case "test_strings"; testing time: 198mks
|
||||
Leaving test module "boost_test_strings"; testing time: 702mks
|
||||
|
||||
*** 2 failures are detected in the test module "boost_test_strings"
|
||||
|
@ -2,7 +2,7 @@
|
||||
> custom_init
|
||||
using custom init
|
||||
Running 1 test case...
|
||||
custom_init.cpp(7): error: in "test1": check false has failed
|
||||
test.cpp(7): error: in "test1": check false has failed
|
||||
|
||||
*** 1 failure is detected in the test module "Master Test Suite"
|
||||
//]
|
@ -2,7 +2,7 @@
|
||||
> custom_main
|
||||
Using custom entry point...
|
||||
Running 1 test case...
|
||||
custom_main.cpp(10): error: in "test1": check false has failed
|
||||
test.cpp(10): error: in "test1": check false has failed
|
||||
|
||||
*** 1 failure is detected in the test module "custom_main"
|
||||
//]
|
@ -2,7 +2,7 @@
|
||||
> custom_obsolete_init
|
||||
using obsolete init
|
||||
Running 1 test case...
|
||||
custom_obsolete_init.cpp(6): error: in "test1": check false has failed
|
||||
test.cpp(6): error: in "test1": check false has failed
|
||||
|
||||
*** 1 failure is detected in the test module "Master Test Suite"
|
||||
//]
|
@ -9,7 +9,7 @@ test 1: 4
|
||||
test 2: 1
|
||||
test 2: 4
|
||||
test 2: 7
|
||||
dataset_example59.cpp(27): error: in "test2": check (sample <= 4 && sample >= 0) has failed
|
||||
test.cpp(27): error: in "test2": check (sample <= 4 && sample >= 0) has failed
|
||||
Failure occurred in a following context:
|
||||
sample = 7;
|
||||
|
||||
|
@ -9,25 +9,25 @@ test 1: 13, 4
|
||||
test 1: 17, 5
|
||||
test 1: 11, 6
|
||||
test 2: 1.81472, 0
|
||||
dataset_example63.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
test.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
Failure occurred in a following context:
|
||||
random_sample = 1.81472373; index = 0;
|
||||
test 2: 1.13548, 1
|
||||
test 2: 1.90579, 2
|
||||
dataset_example63.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
test.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
Failure occurred in a following context:
|
||||
random_sample = 1.905792; index = 2;
|
||||
test 2: 1.83501, 3
|
||||
dataset_example63.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
test.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
Failure occurred in a following context:
|
||||
random_sample = 1.83500862; index = 3;
|
||||
test 2: 1.12699, 4
|
||||
test 2: 1.96887, 5
|
||||
dataset_example63.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
test.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
Failure occurred in a following context:
|
||||
random_sample = 1.96886778; index = 5;
|
||||
test 2: 1.91338, 6
|
||||
dataset_example63.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
test.cpp(35): error: in "test2": check random_sample < 1.7 has failed
|
||||
Failure occurred in a following context:
|
||||
random_sample = 1.91337585; index = 6;
|
||||
|
||||
|
@ -8,21 +8,21 @@ test 1: 1, 0
|
||||
test 1: 1, 1
|
||||
test 1: 1, 2
|
||||
test 2: 0 / 1.81472, 0
|
||||
dataset_example64.cpp(40): error: in "test2": check random_sample < 1.7 has failed [1.81472373 >= 1.7]
|
||||
test.cpp(40): error: in "test2": check random_sample < 1.7 has failed [1.81472373 >= 1.7]
|
||||
Failure occurred in a following context:
|
||||
xr = 0; random_sample = 1.81472373; index = 0;
|
||||
test 2: 0 / 1.13548, 1
|
||||
test 2: 1 / 1.90579, 0
|
||||
dataset_example64.cpp(40): error: in "test2": check random_sample < 1.7 has failed [1.905792 >= 1.7]
|
||||
test.cpp(40): error: in "test2": check random_sample < 1.7 has failed [1.905792 >= 1.7]
|
||||
Failure occurred in a following context:
|
||||
xr = 1; random_sample = 1.905792; index = 0;
|
||||
test 2: 1 / 1.83501, 1
|
||||
dataset_example64.cpp(40): error: in "test2": check random_sample < 1.7 has failed [1.83500862 >= 1.7]
|
||||
test.cpp(40): error: in "test2": check random_sample < 1.7 has failed [1.83500862 >= 1.7]
|
||||
Failure occurred in a following context:
|
||||
xr = 1; random_sample = 1.83500862; index = 1;
|
||||
test 2: 2 / 1.12699, 0
|
||||
test 2: 2 / 1.96887, 1
|
||||
dataset_example64.cpp(40): error: in "test2": check random_sample < 1.7 has failed [1.96886778 >= 1.7]
|
||||
test.cpp(40): error: in "test2": check random_sample < 1.7 has failed [1.96886778 >= 1.7]
|
||||
Failure occurred in a following context:
|
||||
xr = 2; random_sample = 1.96886778; index = 1;
|
||||
|
||||
|
@ -10,11 +10,11 @@ test 1: 5 / index: 5
|
||||
test 1: 8 / index: 6
|
||||
test 1: 13 / index: 7
|
||||
test 1: 21 / index: 8
|
||||
dataset_example68.cpp(85): error: in "test1": check fib_sample <= 13 has failed [21 > 13]
|
||||
test.cpp(85): error: in "test1": check fib_sample <= 13 has failed [21 > 13]
|
||||
Failure occurred in a following context:
|
||||
fib_sample = 21; index = 8;
|
||||
test 1: 34 / index: 9
|
||||
dataset_example68.cpp(85): error: in "test1": check fib_sample <= 13 has failed [34 > 13]
|
||||
test.cpp(85): error: in "test1": check fib_sample <= 13 has failed [34 > 13]
|
||||
Failure occurred in a following context:
|
||||
fib_sample = 34; index = 9;
|
||||
|
||||
|
@ -1,24 +1,24 @@
|
||||
//[example_output
|
||||
> decorator_04
|
||||
Running 3 test cases...
|
||||
decorator_04.cpp(8): error: in "test1": check false has failed
|
||||
decorator_04.cpp(15): error: in "test2": check false has failed
|
||||
decorator_04.cpp(20): error: in "test3": check false has failed
|
||||
test.cpp(8): error: in "test1": check false has failed
|
||||
test.cpp(15): error: in "test2": check false has failed
|
||||
test.cpp(20): error: in "test3": check false has failed
|
||||
|
||||
*** 3 failures are detected in the test module "decorator_04"
|
||||
|
||||
|
||||
> decorator_04 --run_test=@l1
|
||||
Running 2 test cases...
|
||||
decorator_04.cpp(8): error: in "test1": check false has failed
|
||||
decorator_04.cpp(15): error: in "test2": check false has failed
|
||||
test.cpp(8): error: in "test1": check false has failed
|
||||
test.cpp(15): error: in "test2": check false has failed
|
||||
|
||||
*** 2 failures are detected in the test module "decorator_04"
|
||||
|
||||
|
||||
> decorator_04 --run_test=@l2
|
||||
Running 1 test case...
|
||||
decorator_04.cpp(15): error: in "test2": check false has failed
|
||||
test.cpp(15): error: in "test2": check false has failed
|
||||
|
||||
*** 1 failure is detected in the test module "decorator_04"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//[example_output
|
||||
> decorator_05
|
||||
Running 1 test case...
|
||||
decorator_05.cpp(14): error: in "suite1/test2": check 2 != 2 has failed [2 == 2]
|
||||
test.cpp(14): error: in "suite1/test2": check 2 != 2 has failed [2 == 2]
|
||||
|
||||
*** 1 failure is detected in the test module "decorator_05"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//[example_output
|
||||
> decorator_06
|
||||
Running 1 test case...
|
||||
decorator_06.cpp(11): error: in "test_io": check 1 != 1 has failed [1 == 1]
|
||||
test.cpp(11): error: in "test_io": check 1 != 1 has failed [1 == 1]
|
||||
|
||||
*** 1 failure is detected in the test module "decorator_06"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//[example_output
|
||||
> decorator_07 --report_level=detailed
|
||||
Running 4 test cases...
|
||||
decorator_07.cpp(10): error: in "test3": check false has failed
|
||||
test.cpp(10): error: in "test3": check false has failed
|
||||
|
||||
Test module "decorator_07" has failed with:
|
||||
1 test case out of 4 passed
|
||||
|
@ -2,15 +2,15 @@
|
||||
> decorator_08 --log_level=test_suite
|
||||
Running 4 test cases...
|
||||
Entering test module "decorator_08"
|
||||
decorator_08.cpp(6): Entering test case "test1"
|
||||
decorator_08.cpp(6): Leaving test case "test1"; testing time: 1ms
|
||||
decorator_08.cpp(11): Entering test case "test2"
|
||||
decorator_08.cpp(13): error: in "test2": check false has failed
|
||||
decorator_08.cpp(11): Leaving test case "test2"; testing time: 2ms
|
||||
decorator_08.cpp(39): Entering test case "test3"
|
||||
decorator_08.cpp(41): error: in "test3": check false has failed
|
||||
decorator_08.cpp(39): Leaving test case "test3"; testing time: 2ms
|
||||
decorator_08.cpp(45): Test case "test4" is skipped because test2 and test3 failed
|
||||
test.cpp(6): Entering test case "test1"
|
||||
test.cpp(6): Leaving test case "test1"; testing time: 1ms
|
||||
test.cpp(11): Entering test case "test2"
|
||||
test.cpp(13): error: in "test2": check false has failed
|
||||
test.cpp(11): Leaving test case "test2"; testing time: 2ms
|
||||
test.cpp(39): Entering test case "test3"
|
||||
test.cpp(41): error: in "test3": check false has failed
|
||||
test.cpp(39): Leaving test case "test3"; testing time: 2ms
|
||||
test.cpp(45): Test case "test4" is skipped because test2 and test3 failed
|
||||
Leaving test module "decorator_08"; testing time: 16ms
|
||||
|
||||
*** 2 failures are detected in the test module "decorator_08"
|
||||
|
@ -1,18 +1,18 @@
|
||||
//[example_output
|
||||
> decorator_10
|
||||
Running 2 test cases...
|
||||
decorator_10.cpp(11): error: in "suite1/test1": check false has failed
|
||||
decorator_10.cpp(12): error: in "suite1/test1": check false has failed
|
||||
decorator_10.cpp(17): error: in "suite1/test2": check false has failed
|
||||
decorator_10.cpp(18): error: in "suite1/test2": check false has failed
|
||||
test.cpp(11): error: in "suite1/test1": check false has failed
|
||||
test.cpp(12): error: in "suite1/test1": check false has failed
|
||||
test.cpp(17): error: in "suite1/test2": check false has failed
|
||||
test.cpp(18): error: in "suite1/test2": check false has failed
|
||||
|
||||
*** 4 failures are detected (3 failures are expected) in the test module "decorator_10"
|
||||
|
||||
|
||||
> decorator_10 --run_test=suite1/test1
|
||||
Running 1 test case...
|
||||
decorator_10.cpp(11): error: in "suite1/test1": check false has failed
|
||||
decorator_10.cpp(12): error: in "suite1/test1": check false has failed
|
||||
test.cpp(11): error: in "suite1/test1": check false has failed
|
||||
test.cpp(12): error: in "suite1/test1": check false has failed
|
||||
|
||||
*** No errors detected
|
||||
//]
|
@ -2,7 +2,7 @@
|
||||
> decorator_11
|
||||
Running 1 test case...
|
||||
unknown location(0): fatal error: in "test1": signal: SIGALRM (timeout while executing function)
|
||||
decorator_11.cpp(5): last checkpoint: "test1" entry.
|
||||
test.cpp(5): last checkpoint: "test1" entry.
|
||||
|
||||
*** 1 failure detected in test module "decorator_11"
|
||||
*** 1 failures is detected in test module "decorator_11"
|
||||
//]
|
@ -1,12 +1,12 @@
|
||||
//[example_output
|
||||
> decorator_13
|
||||
Running 5 test cases...
|
||||
decorator_13.cpp(9): error: in "test1": check 0.001 == 0.000 has failed [0.001 != 0]. Absolute value exceeds tolerance [|0.001| > 0.0005]
|
||||
decorator_13.cpp(10): error: in "test1": check 1.100 == 1.101 has failed [1.1000000000000001 != 1.101]. Relative difference exceeds tolerance [0.000908265 > 0.0005]
|
||||
decorator_13.cpp(21): error: in "test3": check 0.001 == 0.000 has failed [0.001 != 0]. Absolute value exceeds tolerance [|0.001| > 0]
|
||||
decorator_13.cpp(22): error: in "test3": check 1.100 == 1.101 has failed [1.1000000000000001 != 1.101]
|
||||
decorator_13.cpp(28): error: in "test4": check 0.001 == 0.000 has failed [0.001 != 0]. Absolute value exceeds tolerance [|0.001| > 0.0005]
|
||||
decorator_13.cpp(29): error: in "test4": check 1.100 == 1.101 has failed [1.1000000000000001 != 1.101]. Relative difference exceeds tolerance [0.000908265 > 0.0005]
|
||||
test.cpp(9): error: in "test1": check 0.001 == 0.000 has failed [0.001 != 0]. Absolute value exceeds tolerance [|0.001| > 0.0005]
|
||||
test.cpp(10): error: in "test1": check 1.100 == 1.101 has failed [1.1000000000000001 != 1.101]. Relative difference exceeds tolerance [0.000908265 > 0.0005]
|
||||
test.cpp(21): error: in "test3": check 0.001 == 0.000 has failed [0.001 != 0]. Absolute value exceeds tolerance [|0.001| > 0]
|
||||
test.cpp(22): error: in "test3": check 1.100 == 1.101 has failed [1.1000000000000001 != 1.101]
|
||||
test.cpp(28): error: in "test4": check 0.001 == 0.000 has failed [0.001 != 0]. Absolute value exceeds tolerance [|0.001| > 0.0005]
|
||||
test.cpp(29): error: in "test4": check 1.100 == 1.101 has failed [1.1000000000000001 != 1.101]. Relative difference exceeds tolerance [0.000908265 > 0.0005]
|
||||
|
||||
*** 6 failures are detected in the test module "decorator_13"
|
||||
//]
|
||||
|
@ -1,8 +1,8 @@
|
||||
//[example_output
|
||||
> decorator_20
|
||||
Running 2 test cases...
|
||||
decorator_20.cpp(18): error: in "suite1/test_2": check 2 != 2 has failed [2 == 2]
|
||||
decorator_20.cpp(24): error: in "suite1/test_io": check 3 != 3 has failed [3 == 3]
|
||||
test.cpp(18): error: in "suite1/test_2": check 2 != 2 has failed [2 == 2]
|
||||
test.cpp(24): error: in "suite1/test_io": check 3 != 3 has failed [3 == 3]
|
||||
|
||||
*** 2 failures are detected in the test module "decorator_20"
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
Including test case test_1 as a dependency of test case test_2
|
||||
Running 3 test cases...
|
||||
Entering test module "decorator_21"
|
||||
decorator_21.cpp(14): Entering test case "test_1"
|
||||
decorator_21.cpp(16): error: in "test_1": check false has failed
|
||||
decorator_21.cpp(14): Leaving test case "test_1"; testing time: 3ms
|
||||
decorator_21.cpp(26): Test case "test_3" is skipped because precondition failed
|
||||
decorator_21.cpp(20): Test case "test_2" is skipped because dependency test case "test_1" has failed
|
||||
test.cpp(14): Entering test case "test_1"
|
||||
test.cpp(16): error: in "test_1": check false has failed
|
||||
test.cpp(14): Leaving test case "test_1"; testing time: 3ms
|
||||
test.cpp(26): Test case "test_3" is skipped because precondition failed
|
||||
test.cpp(20): Test case "test_2" is skipped because dependency test case "test_1" has failed
|
||||
Leaving test module "decorator_21"; testing time: 17ms
|
||||
|
||||
*** 1 failure is detected in the test module "decorator_21"
|
||||
|
@ -7,8 +7,8 @@ test_net : requires network
|
||||
> decorator_22 --log_level=test_suite
|
||||
Running 1 test case...
|
||||
Entering test module "decorator_22"
|
||||
decorator_22.cpp(6): Entering test case "test_1"
|
||||
decorator_22.cpp(6): Leaving test case "test_1"
|
||||
test.cpp(6): Entering test case "test_1"
|
||||
test.cpp(6): Leaving test case "test_1"
|
||||
Leaving test module "decorator_22"; testing time: 5ms
|
||||
|
||||
*** No errors detected
|
||||
@ -17,10 +17,10 @@ Leaving test module "decorator_22"; testing time: 5ms
|
||||
> decorator_22 --log_level=test_suite --run_test=+test_net
|
||||
Running 2 test cases...
|
||||
Entering test module "decorator_22"
|
||||
decorator_22.cpp(6): Entering test case "test_1"
|
||||
decorator_22.cpp(6): Leaving test case "test_1"; testing time: 1ms
|
||||
decorator_22.cpp(13): Entering test case "test_net"
|
||||
decorator_22.cpp(13): Leaving test case "test_net"; testing time: 1ms
|
||||
test.cpp(6): Entering test case "test_1"
|
||||
test.cpp(6): Leaving test case "test_1"; testing time: 1ms
|
||||
test.cpp(13): Entering test case "test_net"
|
||||
test.cpp(13): Leaving test case "test_net"; testing time: 1ms
|
||||
Leaving test module "decorator_22"; testing time: 16ms
|
||||
|
||||
*** No errors detected
|
||||
|
@ -7,10 +7,10 @@ test_net*: requires network
|
||||
> decorator_23 --log_level=test_suite
|
||||
Running 2 test cases...
|
||||
Entering test module "decorator_23"
|
||||
decorator_23.cpp(6): Entering test case "test_1"
|
||||
decorator_23.cpp(6): Leaving test case "test_1"
|
||||
decorator_23.cpp(12): Entering test case "test_net"
|
||||
decorator_23.cpp(12): Leaving test case "test_net"
|
||||
test.cpp(6): Entering test case "test_1"
|
||||
test.cpp(6): Leaving test case "test_1"
|
||||
test.cpp(12): Entering test case "test_net"
|
||||
test.cpp(12): Leaving test case "test_net"
|
||||
Leaving test module "decorator_23"; testing time: 14ms
|
||||
|
||||
*** No errors detected
|
||||
@ -19,7 +19,7 @@ Leaving test module "decorator_23"; testing time: 14ms
|
||||
> decorator_23 --log_level=test_suite --run_test=!test_net
|
||||
Running 1 test case...
|
||||
Entering test module "decorator_23"
|
||||
decorator_23.cpp(6): Entering test case "test_1"
|
||||
decorator_23.cpp(6): Leaving test case "test_1"
|
||||
test.cpp(6): Entering test case "test_1"
|
||||
test.cpp(6): Leaving test case "test_1"
|
||||
Leaving test module "decorator_23"; testing time: 5ms
|
||||
//]
|
||||
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(11): error in "boost::bind( &test_class::test_method, &tester )": check false failed
|
||||
|
||||
*** 1 failure detected in test suite "Master Test Suite"
|
||||
*** 1 failures is detected in test suite "Master Test Suite"
|
||||
//]
|
||||
|
@ -3,5 +3,5 @@
|
||||
Running 2 test cases...
|
||||
test.cpp(15): error in "boost::bind( &test_class::test_method2, tester )": check false failed
|
||||
|
||||
*** 1 failure detected in test suite "Master Test Suite"
|
||||
*** 1 failures is detected in test suite "Master Test Suite"
|
||||
//]
|
@ -4,5 +4,5 @@ Running 5 test cases...
|
||||
test.cpp(9): error in "free_test_function": check i < 4 failed
|
||||
test.cpp(9): error in "free_test_function": check i < 4 failed
|
||||
|
||||
*** 2 failures detected in test suite "Master Test Suite"
|
||||
*** 2 failures are detected in test suite "Master Test Suite"
|
||||
//]
|
@ -4,5 +4,5 @@ Running 5 test cases...
|
||||
test.cpp(14): error in "tm": difference between d * 100{100.1} and (double)(int)(d*100){100} exceeds 0.01%
|
||||
test.cpp(14): error in "tm": difference between d * 100{100.01} and (double)(int)(d*100){100} exceeds 0.01%
|
||||
|
||||
*** 2 failures detected in test suite "Master Test Suite"
|
||||
*** 2 failures are detected in test suite "Master Test Suite"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 3 test cases...
|
||||
test.cpp(10): error in "my_test<unsigned char>": check sizeof(T) == 4 failed [1 != 4]
|
||||
|
||||
*** 1 failure detected in test suite "Master Test Suite"
|
||||
*** 1 failures is detected in test suite "Master Test Suite"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 3 test cases...
|
||||
test.cpp(12): error in "my_test<unsigned char>": check sizeof(T) == 4 failed [1 != 4]
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -4,5 +4,5 @@ Running 4 test cases...
|
||||
test.cpp(12): fatal error in "test_case2": critical check 1 == 2 failed [1 != 2]
|
||||
test.cpp(27): error in "test_case4": check false failed
|
||||
|
||||
*** 2 failures detected in test suite "example"
|
||||
*** 2 failures are detected in test suite "example"
|
||||
//]
|
@ -8,5 +8,5 @@ setup fixture
|
||||
test.cpp(19): error in "test_case2": check i == 1 failed [0 != 1]
|
||||
teardown fixture
|
||||
|
||||
*** 2 failures detected in test suite "example"
|
||||
*** 2 failures are detected in test suite "example"
|
||||
//]
|
@ -4,5 +4,5 @@ Running 1 test case...
|
||||
unknown location(0): fatal error in "test_external_interface": signal: integer divide by zero; address of failing instruction: 0x00048090
|
||||
test.cpp(13): last checkpoint: Calling foo with i=1
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -4,5 +4,5 @@ Running 1 test case...
|
||||
unknown location(0): fatal error in "test_case": memory access violation at address: 0x00000008: no mapping at fault address
|
||||
test.cpp(16): last checkpoint
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(15): error in "test": check output.is_equal( "i=3" ) failed. Output content: "i=2"
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -5,5 +5,5 @@ test.cpp(16): error in "test": check output.match_pattern() failed. Mismatch at
|
||||
...5...
|
||||
...4...
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(13): error in "test_is_even": check is_even( i ) failed for ( 17 )
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -2,5 +2,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(28): error in "test_list_comparizon": check compare_lists( l1, l2 ) failed. Different sizes [2!=0]
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -2,5 +2,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(16): error in "test_list": check p1 == p2 failed [ != ]
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -6,5 +6,5 @@ Mismatch in a position 1
|
||||
Mismatch in a position 5
|
||||
Operands bit sizes mismatch: 8 != 32
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -5,5 +5,5 @@ test.cpp(9): warning in "test": condition sizeof(int) == sizeof(short) is not sa
|
||||
test.cpp(10): error in "test": check i == 1 failed
|
||||
test.cpp(11): fatal error in "test": critical check i > 5 failed
|
||||
|
||||
*** 2 failures detected in test suite "example"
|
||||
*** 2 failures are detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(10): fatal error in "test": critical check i == j failed [2 != 1]
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -5,5 +5,5 @@ test.cpp(11): error in "test": check { col1, col1+7 } == { col2, col2+7 } failed
|
||||
Mismatch in a position 2: 3 != 4
|
||||
Mismatch in a position 5: 6 != 7
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(16): error in "test": incorrect exception my_exception is caught
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(10): error in "test": exception thrown by throw my_exception()
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(11): error in "test": absolute value of v{-0.00123456} exceeds 1e-006
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(12): error in "test": difference between v1{1.23456e-010} and v2{1.23457e-010} exceeds 0.0001%
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(12): error in "test": difference between v1{1.111e-010} and v2{1.112e-010} exceeds 0.0008999
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(11): error in "test": exception my_exception is expected
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(8): error in "test": Nothing to test
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(8): fatal error in "test": Test is not ready yet
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -4,5 +4,5 @@ Running 1 test case...
|
||||
test.cpp(8): error in "test": check ::boost::test_tools::tt_detail::is_defined_impl( "SYMBOL1", "= SYMBOL1" ) failed
|
||||
test.cpp(9): error in "test": check ::boost::test_tools::tt_detail::is_defined_impl( "SYMBOL2(arg)", "= SYMBOL2(arg)" ) failed
|
||||
|
||||
*** 2 failures detected in test suite "example"
|
||||
*** 2 failures are detected in test suite "example"
|
||||
//]
|
@ -1,7 +1,7 @@
|
||||
//[example_output
|
||||
> example
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
> cat example.log
|
||||
Running 1 test case...
|
||||
test.cpp(20): error in "test_case": check false failed
|
||||
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(10): error in "test": check i != j failed [3 == 3]
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(10): error in "test": check i <= j failed [9 > 6]
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(10): error in "test": check i < j failed [7 >= 7]
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(10): error in "test": check i >= j failed [1 < 4]
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -3,5 +3,5 @@
|
||||
Running 1 test case...
|
||||
test.cpp(10): error in "test": check i > j failed [2 < 14]
|
||||
|
||||
*** 1 failure detected in test suite "example"
|
||||
*** 1 failures is detected in test suite "example"
|
||||
//]
|
@ -6,6 +6,6 @@ Failure occurred in a following context:
|
||||
Gamma
|
||||
Delta
|
||||
|
||||
*** 1 failure detected in test module "example80"
|
||||
*** 1 failures is detected in test module "example80"
|
||||
|
||||
//]
|
@ -11,21 +11,21 @@
|
||||
|
||||
void test()
|
||||
{
|
||||
BOOST_CHECK(2 != 2);
|
||||
BOOST_TEST(2 != 2);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_case1)
|
||||
{
|
||||
BOOST_TEST_CONTEXT("Alpha") {
|
||||
BOOST_CHECK(1 != 1);
|
||||
BOOST_TEST(1 != 1);
|
||||
test();
|
||||
|
||||
BOOST_TEST_CONTEXT("Be" << "ta")
|
||||
BOOST_CHECK(3 != 3);
|
||||
BOOST_TEST(3 != 3);
|
||||
|
||||
BOOST_CHECK(4 == 4);
|
||||
BOOST_TEST(4 == 4);
|
||||
}
|
||||
|
||||
BOOST_CHECK(5 != 5);
|
||||
BOOST_TEST(5 != 5);
|
||||
}
|
||||
//]
|
||||
|
@ -1,17 +1,17 @@
|
||||
//[example_output
|
||||
> example81
|
||||
Running 1 test case...
|
||||
test.cpp(20): error: in "test_case1": check 1 != 1 has failed
|
||||
test.cpp(20): error: in "test_case1": check 1 != 1 has failed [1 == 1]
|
||||
Failure occurred in a following context:
|
||||
Alpha
|
||||
test.cpp(14): error: in "test_case1": check 2 != 2 has failed
|
||||
test.cpp(14): error: in "test_case1": check 2 != 2 has failed [2 == 2]
|
||||
Failure occurred in a following context:
|
||||
Alpha
|
||||
test.cpp(24): error: in "test_case1": check 3 != 3 has failed
|
||||
test.cpp(24): error: in "test_case1": check 3 != 3 has failed [3 == 3]
|
||||
Failure occurred in a following context:
|
||||
Alpha
|
||||
Beta
|
||||
test.cpp(29): error: in "test_case1": check 5 != 5 has failed
|
||||
test.cpp(29): error: in "test_case1": check 5 != 5 has failed [5 == 5]
|
||||
|
||||
*** 4 failures detected in test module "example81"
|
||||
*** 4 failures are detected in test module "example81"
|
||||
//]
|
@ -21,10 +21,10 @@ void test_operations(Processor& processor, int limit)
|
||||
{
|
||||
for (int i = 0; i < limit; ++i) {
|
||||
BOOST_TEST_CONTEXT("With parameter i = " << i) {
|
||||
BOOST_CHECK(processor.op1(i));
|
||||
BOOST_TEST(processor.op1(i));
|
||||
for (int j = 0; j < i; ++j) {
|
||||
BOOST_TEST_INFO("With parameter j = " << j);
|
||||
BOOST_CHECK(processor.op2(i, j));
|
||||
BOOST_TEST(processor.op2(i, j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,5 +20,5 @@ Failure occurred in a following context:
|
||||
With parameter i = 1
|
||||
With parameter j = 0
|
||||
|
||||
*** 4 failures detected in test module "example82"
|
||||
*** 4 failures are detected in the test module "example82"
|
||||
//]
|
@ -1,7 +1,7 @@
|
||||
//[example_output
|
||||
> test_float_01
|
||||
Running 1 test case...
|
||||
test_float_01.cpp(11): error: in "test": check d1 == d2 has failed [1 != 0.98999999999999999]
|
||||
test.cpp(11): error: in "test": check d1 == d2 has failed [1 != 0.98999999999999999]
|
||||
|
||||
*** 1 failure is detected in the test module "test_float_01"
|
||||
//]
|
@ -1,10 +1,10 @@
|
||||
//[example_output
|
||||
> test_float_02
|
||||
Running 2 test cases...
|
||||
test_float_02.cpp(11): error: in "double_tolerance": check f1 == f2 has failed [1 != 0.99000001]
|
||||
test_float_02.cpp(21): error: in "float_tolerance": check d1 == d2 has failed [1 != 0.98999999999999999]
|
||||
test_float_02.cpp(23): error: in "float_tolerance": check f1 == d2 has failed [1 != 0.98999999999999999]
|
||||
test_float_02.cpp(24): error: in "float_tolerance": check d1 == f2 has failed [1 != 0.99000001]
|
||||
test.cpp(11): error: in "double_tolerance": check f1 == f2 has failed [1 != 0.99000001]
|
||||
test.cpp(21): error: in "float_tolerance": check d1 == d2 has failed [1 != 0.98999999999999999]
|
||||
test.cpp(23): error: in "float_tolerance": check f1 == d2 has failed [1 != 0.98999999999999999]
|
||||
test.cpp(24): error: in "float_tolerance": check d1 == f2 has failed [1 != 0.99000001]
|
||||
|
||||
*** 4 failures are detected in the test module "test_float_02"
|
||||
//]
|
@ -1,9 +1,9 @@
|
||||
//[example_output
|
||||
> test_float_03
|
||||
Running 1 test case...
|
||||
test_float_03.cpp(12): error: in "test": check o1 == o2 has failed [ 1 != 0.99]
|
||||
test_float_03.cpp(13): error: in "test": check o1 == d2 has failed [ 1 != 0.98999999999999999]
|
||||
test_float_03.cpp(14): error: in "test": check d1 == o2 has failed [1 != 0.99]
|
||||
test.cpp(12): error: in "test": check o1 == o2 has failed [ 1 != 0.99]
|
||||
test.cpp(13): error: in "test": check o1 == d2 has failed [ 1 != 0.98999999999999999]
|
||||
test.cpp(14): error: in "test": check d1 == o2 has failed [1 != 0.99]
|
||||
|
||||
*** 3 failures are detected in the test module "test_float_03"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/
|
||||
[/
|
||||
/ Copyright (c) 2013 Boost.Test team
|
||||
/
|
||||
/ Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
@ -13,9 +13,9 @@ Contexts are a facility provided by the __UTF__ in order to be able to trace the
|
||||
void test_operations(Processor& processor, int limit)
|
||||
{
|
||||
for (int i = 0; i < limit; ++i) {
|
||||
BOOST_CHECK(processor.op1(i));
|
||||
BOOST_TEST(processor.op1(i));
|
||||
for (int j = 0; j < i; ++j) {
|
||||
BOOST_CHECK(processor.op2(i, j));
|
||||
BOOST_TEST(processor.op2(i, j));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -24,13 +24,13 @@ void test_operations(Processor& processor, int limit)
|
||||
In case of failure, in order to see in the logs at which point of the loops the failure occurred, we need some extra information in the assertion:
|
||||
|
||||
``
|
||||
BOOST_CHECK(processor.op1(i));
|
||||
BOOST_TEST(processor.op1(i));
|
||||
``
|
||||
|
||||
replaced by
|
||||
|
||||
``
|
||||
BOOST_CHECK_MESSAGE(processor.op1(i), "With parameter i = " << i);
|
||||
BOOST_TEST_MESSAGE(processor.op1(i), "With parameter i = " << i);
|
||||
``
|
||||
|
||||
We see in this trivial example that a context, which is the variable `i` in this case, should be acknowledged by the assertion `BOOST_CHECK` in a particular way. In
|
||||
@ -43,9 +43,12 @@ In case the complexity of the context increases, the fact that the assertion and
|
||||
void test_operations(Processor& processor, int limit, int level)
|
||||
{
|
||||
for (int i = 0; i < limit; ++i) {
|
||||
BOOST_CHECK_MESSAGE(processor.op1(i), "With optimization level " << level << ", With parameter i = " << i);
|
||||
BOOST_TEST_MESSAGE(processor.op1(i),
|
||||
"With optimization level " << level << ", With parameter i = " << i);
|
||||
for (int j = 0; j < i; ++j) {
|
||||
BOOST_CHECK_MESSAGE(processor.op2(i, j), "With optimization level " << level << ", With parameter i = " << i << ", With parameter j = " << j);
|
||||
BOOST_TEST_MESSAGE(processor.op2(i, j),
|
||||
"With optimization level " << level <<
|
||||
", With parameter i = " << i << ", With parameter j = " << j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -61,17 +64,20 @@ BOOST_AUTO_TEST_CASE(test1)
|
||||
}
|
||||
``
|
||||
|
||||
Note the length of the messages, the repetition, and the fact, that we pass argument `level` to function `test_operations` only for the sake of generating an error message in case of a failure.
|
||||
Note the length of the messages, the repetition, and the fact, that we pass argument `level` to function `test_operations`
|
||||
only for the sake of generating an error message in case of a failure.
|
||||
|
||||
Therefore, *loose* coupling between the context of an assertion and the assertion point is a property that is desirable.
|
||||
|
||||
[#ref_BOOST_TEST_INFO][h3 Assertion-bound context]
|
||||
|
||||
Macro `BOOST_TEST_INFO` can be used to define an error message to be bound to the first following assertion. If (and only if) the assertion fails, the bound message will be displayed along:
|
||||
Macro `BOOST_TEST_INFO` can be used to define an error message to be bound to the first following assertion. If (and only if)
|
||||
the assertion fails, the bound message will be displayed along:
|
||||
|
||||
[bt_example example80_contexts..Assertion-bound context]
|
||||
|
||||
Observe the following things. The information composed inside `BOOST_TEST_INFO` is bound only to the first assertion following the declaration. Thus bound information is only displayed if the assertion fails; otherwise the message is discarded. The `BOOST_TEST_INFO` declaration does not have to immediately precede the assertion, it is allowed to intertwine them with other instructions, they can even be declared in different scopes. Therefore it is also possible to bind more than one information to a given assertion.
|
||||
Observe the following things. The information composed inside `BOOST_TEST_INFO` is bound only to the first assertion following
|
||||
the declaration. Thus bound information is only displayed if the assertion fails; otherwise the message is discarded. The `BOOST_TEST_INFO` declaration does not have to immediately precede the assertion, it is allowed to intertwine them with other instructions, they can even be declared in different scopes. Therefore it is also possible to bind more than one information to a given assertion.
|
||||
|
||||
With `BOOST_TEST_INFO`, we can improve our initial example as follows:
|
||||
|
||||
@ -81,12 +87,12 @@ void test_operations(Processor& processor, int limit, int level)
|
||||
for (int i = 0; i < limit; ++i) {
|
||||
BOOST_TEST_INFO("With optimization level " << level);
|
||||
BOOST_TEST_INFO("With parameter i = " << i);
|
||||
BOOST_CHECK(processor.op1(i));
|
||||
BOOST_TEST(processor.op1(i));
|
||||
for (int j = 0; j < i; ++j) {
|
||||
BOOST_TEST_INFO("With optimization level " << level);
|
||||
BOOST_TEST_INFO("With parameter i = " << i);
|
||||
BOOST_TEST_INFO("With parameter j = " << j);
|
||||
BOOST_CHECK(processor.op2(i, j));
|
||||
BOOST_TEST(processor.op2(i, j));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -104,24 +110,28 @@ BOOST_AUTO_TEST_CASE(test1)
|
||||
|
||||
[#ref_BOOST_TEST_CONTEXT][h3 Scope-bound context]
|
||||
|
||||
Macro `BOOST_TEST_CONTEXT` defines a diagnostic message and a scope. The message is bound to every assertion in the scope, and is displayed along with every failed assertion.
|
||||
Macro `BOOST_TEST_CONTEXT` defines a diagnostic message and a scope. The message is bound to every assertion in the scope,
|
||||
and is displayed along with every failed assertion.
|
||||
|
||||
[bt_example example81_contexts..Scope-bound context]
|
||||
|
||||
Observe the following things. After the `BOOST_TEST_CONTEXT` macro we have a pair of braces: they define the scope in which the diagnostic message is in effect. If there is no braces, the scope applies only to the following statement. `BOOST_TEST_CONTEXT` declarations can nest.
|
||||
Observe the following things. After the `BOOST_TEST_CONTEXT` macro we have a pair of braces: they define the scope in which
|
||||
the diagnostic message is in effect. If there is no braces, the scope applies only to the following statement.
|
||||
`BOOST_TEST_CONTEXT` declarations can nest.
|
||||
|
||||
With `BOOST_TEST_CONTEXT`, we can further improve our initial example, by putting variable `level` into a scope-level context and not pass it as function parameter:
|
||||
With `BOOST_TEST_CONTEXT`, we can further improve our initial example, by putting variable `level` into a scope-level context
|
||||
and not pass it as function parameter:
|
||||
|
||||
``
|
||||
void test_operations(Processor& processor, int limit)
|
||||
{
|
||||
for (int i = 0; i < limit; ++i) {
|
||||
BOOST_TEST_INFO("With parameter i = " << i);
|
||||
BOOST_CHECK(processor.op1(i));
|
||||
BOOST_TEST(processor.op1(i));
|
||||
for (int j = 0; j < i; ++j) {
|
||||
BOOST_TEST_INFO("With parameter i = " << i);
|
||||
BOOST_TEST_INFO("With parameter j = " << j);
|
||||
BOOST_CHECK(processor.op2(i, j));
|
||||
BOOST_TEST(processor.op2(i, j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,27 +1,18 @@
|
||||
// (C) Copyright Gennadiy Rozental 2001-2014.
|
||||
// (C) Copyright Raffi Enficiaud 2014.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/test for the library home page.
|
||||
//
|
||||
// File : $RCSfile$
|
||||
//
|
||||
// Version : $Revision$
|
||||
//
|
||||
// Description : included Test Execution Monitor test
|
||||
// ***************************************************************************
|
||||
|
||||
// Boost.Test
|
||||
#define BOOST_TEST_MAIN
|
||||
//[example_code
|
||||
#define BOOST_TEST_MODULE boost_test_message
|
||||
#include <boost/test/included/unit_test.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test )
|
||||
BOOST_AUTO_TEST_CASE( test_message )
|
||||
{
|
||||
int i = 1;
|
||||
BOOST_CHECK_EQUAL( i*i, 1 );
|
||||
const int a(1), b(2);
|
||||
BOOST_TEST(a == b, "a should be equal to b: " << a << "!=" << b);
|
||||
BOOST_TEST(a != 10, "value of a=" << a);
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
// EOF
|
||||
//]
|
||||
|
Loading…
Reference in New Issue
Block a user