1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
<?xml version="1.0" encoding="UTF-8"?>
<doctest binary="all_features">
<Options order_by="file" rand_seed="324" first="0" last="4294967295" abort_after="0" subcase_filter_levels="2147483647" case_sensitive="false" no_throw="false" no_skip="false"/>
<TestSuite>
<TestCase name="logging the counter of a loop" filename="logging.cpp" line="0">
<Expression success="false" type="CHECK" filename="logging.cpp" line="0">
<Original>
vec[i] != (1 << i)
</Original>
<Expanded>
1 != 1
</Expanded>
<Info>
current iteration of loop:
</Info>
<Info>
i := 0
</Info>
</Expression>
<Expression success="false" type="CHECK" filename="logging.cpp" line="0">
<Original>
vec[i] != (1 << i)
</Original>
<Expanded>
2 != 2
</Expanded>
<Info>
current iteration of loop:
</Info>
<Info>
i := 1
</Info>
</Expression>
<Expression success="false" type="CHECK" filename="logging.cpp" line="0">
<Original>
vec[i] != (1 << i)
</Original>
<Expanded>
4 != 4
</Expanded>
<Info>
current iteration of loop:
</Info>
<Info>
i := 2
</Info>
</Expression>
<Expression success="false" type="CHECK" filename="logging.cpp" line="0">
<Original>
vec[i] != (1 << i)
</Original>
<Expanded>
8 != 8
</Expanded>
<Info>
current iteration of loop:
</Info>
<Info>
i := 3
</Info>
</Expression>
<Expression success="false" type="CHECK" filename="logging.cpp" line="0">
<Original>
vec[i] != (1 << i)
</Original>
<Expanded>
16 != 16
</Expanded>
<Info>
current iteration of loop:
</Info>
<Info>
i := 4
</Info>
</Expression>
<OverallResultsAsserts successes="0" failures="5" test_case_success="false"/>
</TestCase>
<TestCase name="a test case that will end from an exception" filename="logging.cpp" line="0">
<Message type="ERROR" filename="logging.cpp" line="0">
<Text>
forcing the many captures to be stringified
</Text>
<Info>
lots of captures: 42 42 42;
</Info>
<Info>
old way of capturing - using the streaming operator: 42 42
</Info>
</Message>
<Expression success="false" type="CHECK" filename="logging.cpp" line="0">
<Original>
some_var == 666
</Original>
<Expanded>
42 == 666
</Expanded>
<Info>
someTests() returned: 42
</Info>
<Info>
this should be printed if an exception is thrown even if no assert has failed: 42
</Info>
<Info>
in a nested scope this should be printed as well: 42
</Info>
<Info>
why is this not 666 ?!
</Info>
</Expression>
<Exception crash="false">
0
</Exception>
<OverallResultsAsserts successes="0" failures="2" test_case_success="false"/>
</TestCase>
<TestCase name="a test case that will end from an exception and should print the unprinted context" filename="logging.cpp" line="0">
<Exception crash="false">
0
</Exception>
<OverallResultsAsserts successes="0" failures="0" test_case_success="false"/>
</TestCase>
<TestCase name="third party asserts can report failures to doctest" filename="logging.cpp" line="0">
<Message type="ERROR" filename="logging.cpp" line="0">
<Text>
MY_ASSERT(false)
</Text>
</Message>
<Message type="FATAL ERROR" filename="logging.cpp" line="0">
<Text>
MY_ASSERT_FATAL(false)
</Text>
</Message>
<OverallResultsAsserts successes="0" failures="2" test_case_success="false"/>
</TestCase>
<TestCase name="explicit failures 1" filename="logging.cpp" line="0">
<Message type="ERROR" filename="logging.cpp" line="0">
<Text>
this should not end the test case, but mark it as failing
</Text>
</Message>
<Message type="WARNING" filename="logging.cpp" line="0">
<Text>
reached!
</Text>
</Message>
<OverallResultsAsserts successes="0" failures="1" test_case_success="false"/>
</TestCase>
<TestCase name="explicit failures 2" filename="logging.cpp" line="0">
<Message type="FATAL ERROR" filename="logging.cpp" line="0">
<Text>
fail the test case and also end it
</Text>
</Message>
<OverallResultsAsserts successes="0" failures="1" test_case_success="false"/>
</TestCase>
</TestSuite>
<OverallResultsAsserts successes="0" failures="11"/>
<OverallResultsTestCases successes="0" failures="6"/>
</doctest>
Program code.
|