mirror of
https://github.com/boostorg/test.git
synced 2026-02-13 00:42:09 +00:00
Indicating the log level to the formatters for the contexts
- unit tests for the message part: for checking the dataset, we need to register it and then to re-run it under our own environment (so technically it runs twice in the test module) - refactoring of tests for reusing the stream checker that is agnostic to filenames location, testing time, etc. Modifying the baseline outputs accordingly
This commit is contained in:
@@ -137,6 +137,7 @@ test-suite "framework-ts"
|
||||
[ boost.test-self-test run : framework-ts : run-by-name-or-label-test ]
|
||||
[ boost.test-self-test run : framework-ts : version-uses-module-name : included ]
|
||||
[ boost.test-self-test run : framework-ts : test-macro-global-fixture : : baseline-outputs/global-fixtures-test.pattern ]
|
||||
[ boost.test-self-test run : framework-ts : message-in-datatestcase-test : : baseline-outputs/messages-in-datasets-test.pattern : : : : $(requirements_datasets) ]
|
||||
;
|
||||
|
||||
#_________________________________________________________________________________________________#
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,19 +30,19 @@ xxx/log-formatter-test.cpp:209: Leaving test suite "1 test cases inside"
|
||||
Running 1 test case...
|
||||
xxx/log-formatter-test.cpp:212: Entering test suite "1 bad test case inside"
|
||||
xxx/log-formatter-test.cpp:213: Entering test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:47: error: in "1 bad test case inside/bad_foo":
|
||||
xxx/log-formatter-test.cpp:48: error: in "1 bad test case inside/bad_foo":
|
||||
this is a message
|
||||
xxx/log-formatter-test.cpp:50: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:54: error: in "1 bad test case inside/bad_foo": with some message
|
||||
xxx/log-formatter-test.cpp:51: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:55: error: in "1 bad test case inside/bad_foo": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
xxx/log-formatter-test.cpp:56: error: in "1 bad test case inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:57: error: in "1 bad test case inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:213: Leaving test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:212: Leaving test suite "1 bad test case inside"
|
||||
|
||||
* 2-format *******************************************************************
|
||||
<TestLog><TestSuite name="1 bad test case inside" file="xxx/log-formatter-test.cpp" line="212"><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="213"><Error file="xxx/log-formatter-test.cpp" line="47"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="49"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="50"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="54"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="56"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite></TestLog>
|
||||
<TestLog><TestSuite name="1 bad test case inside" file="xxx/log-formatter-test.cpp" line="212"><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="213"><Error file="xxx/log-formatter-test.cpp" line="48"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="50"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="51"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="55"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="57"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite></TestLog>
|
||||
* 3-format *******************************************************************
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite tests="0" skipped="0" errors="0" failures="1" id="0" name="1_bad_test_case_inside" time="0.1234">
|
||||
@@ -50,13 +50,13 @@ xxx/log-formatter-test.cpp:212: Leaving test suite "1 bad test case inside"
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -66,17 +66,17 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-out><![CDATA[MESSAGE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 49
|
||||
- line : 50
|
||||
- message: this is a message
|
||||
|
||||
INFO:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 50
|
||||
- line : 51
|
||||
- message: check true has passed
|
||||
|
||||
]]></system-out>
|
||||
@@ -94,13 +94,13 @@ INFO:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -110,7 +110,7 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-err><![CDATA[Failures detected in:
|
||||
@@ -124,20 +124,20 @@ ASSERTION FAILURE:
|
||||
Running 1 test case...
|
||||
xxx/log-formatter-test.cpp:215: Entering test suite "1 almost good test case inside"
|
||||
xxx/log-formatter-test.cpp:216: Entering test case "almost_good_foo"
|
||||
xxx/log-formatter-test.cpp:43: warning: in "1 almost good test case inside/almost_good_foo": condition 2>3 is not satisfied [2 <= 3]
|
||||
xxx/log-formatter-test.cpp:44: warning: in "1 almost good test case inside/almost_good_foo": condition 2>3 is not satisfied [2 <= 3]
|
||||
Test case 1 almost good test case inside/almost_good_foo did not check any assertions
|
||||
xxx/log-formatter-test.cpp:216: Leaving test case "almost_good_foo"
|
||||
xxx/log-formatter-test.cpp:215: Leaving test suite "1 almost good test case inside"
|
||||
|
||||
* 2-format *******************************************************************
|
||||
<TestLog><TestSuite name="1 almost good test case inside" file="xxx/log-formatter-test.cpp" line="215"><TestCase name="almost_good_foo" file="xxx/log-formatter-test.cpp" line="216"><Warning file="xxx/log-formatter-test.cpp" line="43"><![CDATA[condition 2>3 is not satisfied [2 <= 3]]]></Warning><Message file="boost.test framework" line="212"><![CDATA[Test case 1 almost good test case inside/almost_good_foo did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase></TestSuite></TestLog>
|
||||
<TestLog><TestSuite name="1 almost good test case inside" file="xxx/log-formatter-test.cpp" line="215"><TestCase name="almost_good_foo" file="xxx/log-formatter-test.cpp" line="216"><Warning file="xxx/log-formatter-test.cpp" line="44"><![CDATA[condition 2>3 is not satisfied [2 <= 3]]]></Warning><Message file="boost.test framework" line="212"><![CDATA[Test case 1 almost good test case inside/almost_good_foo did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase></TestSuite></TestLog>
|
||||
* 3-format *******************************************************************
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite tests="0" skipped="0" errors="0" failures="0" id="0" name="1_almost_good_test_case_inside" time="0.1234">
|
||||
<testcase assertions="0" name="almost_good_foo" time="0.1234">
|
||||
<system-out><![CDATA[WARNING:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 43
|
||||
- line : 44
|
||||
- message: condition 2>3 is not satisfied [2 <= 3]
|
||||
|
||||
MESSAGE:
|
||||
@@ -161,19 +161,19 @@ xxx/log-formatter-test.cpp:219: Entering test case "good_foo"
|
||||
Test case Fake Test Suite Hierarchy/2 test cases inside/good_foo did not check any assertions
|
||||
xxx/log-formatter-test.cpp:219: Leaving test case "good_foo"
|
||||
xxx/log-formatter-test.cpp:220: Entering test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:47: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo":
|
||||
xxx/log-formatter-test.cpp:48: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo":
|
||||
this is a message
|
||||
xxx/log-formatter-test.cpp:50: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:54: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": with some message
|
||||
xxx/log-formatter-test.cpp:51: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:55: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
xxx/log-formatter-test.cpp:56: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:57: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:220: Leaving test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:218: Leaving test suite "2 test cases inside"
|
||||
|
||||
* 2-format *******************************************************************
|
||||
<TestLog><TestSuite name="2 test cases inside" file="xxx/log-formatter-test.cpp" line="218"><TestCase name="good_foo" file="xxx/log-formatter-test.cpp" line="219"><Message file="boost.test framework" line="212"><![CDATA[Test case Fake Test Suite Hierarchy/2 test cases inside/good_foo did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="220"><Error file="xxx/log-formatter-test.cpp" line="47"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="49"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="50"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="54"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="56"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite></TestLog>
|
||||
<TestLog><TestSuite name="2 test cases inside" file="xxx/log-formatter-test.cpp" line="218"><TestCase name="good_foo" file="xxx/log-formatter-test.cpp" line="219"><Message file="boost.test framework" line="212"><![CDATA[Test case Fake Test Suite Hierarchy/2 test cases inside/good_foo did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="220"><Error file="xxx/log-formatter-test.cpp" line="48"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="50"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="51"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="55"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="57"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite></TestLog>
|
||||
* 3-format *******************************************************************
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite tests="1" skipped="0" errors="0" failures="1" id="0" name="2_test_cases_inside" time="0.1234">
|
||||
@@ -189,13 +189,13 @@ xxx/log-formatter-test.cpp:218: Leaving test suite "2 test cases inside"
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -205,17 +205,17 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-out><![CDATA[MESSAGE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 49
|
||||
- line : 50
|
||||
- message: this is a message
|
||||
|
||||
INFO:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 50
|
||||
- line : 51
|
||||
- message: check true has passed
|
||||
|
||||
]]></system-out>
|
||||
@@ -235,13 +235,13 @@ INFO:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -251,7 +251,7 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-err><![CDATA[Failures detected in:
|
||||
@@ -265,17 +265,17 @@ ASSERTION FAILURE:
|
||||
Running 3 test cases...
|
||||
xxx/log-formatter-test.cpp:222: Entering test suite "3 test cases inside"
|
||||
xxx/log-formatter-test.cpp:223: Entering test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:47: error: in "Fake Test Suite Hierarchy/3 test cases inside/bad_foo":
|
||||
xxx/log-formatter-test.cpp:48: error: in "Fake Test Suite Hierarchy/3 test cases inside/bad_foo":
|
||||
this is a message
|
||||
xxx/log-formatter-test.cpp:50: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:54: error: in "Fake Test Suite Hierarchy/3 test cases inside/bad_foo": with some message
|
||||
xxx/log-formatter-test.cpp:51: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:55: error: in "Fake Test Suite Hierarchy/3 test cases inside/bad_foo": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
xxx/log-formatter-test.cpp:56: error: in "Fake Test Suite Hierarchy/3 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:57: error: in "Fake Test Suite Hierarchy/3 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:223: Leaving test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:224: Entering test case "very_bad_foo"
|
||||
xxx/log-formatter-test.cpp:68: fatal error: in "Fake Test Suite Hierarchy/3 test cases inside/very_bad_foo": very_bad_foo is fatal
|
||||
xxx/log-formatter-test.cpp:62: fatal error: in "Fake Test Suite Hierarchy/3 test cases inside/very_bad_foo": very_bad_foo is fatal
|
||||
Failure occurred in a following context:
|
||||
some context
|
||||
xxx/log-formatter-test.cpp:224: Leaving test case "very_bad_foo"
|
||||
@@ -283,7 +283,7 @@ xxx/log-formatter-test.cpp:226: Test case "Fake Test Suite Hierarchy/3 test case
|
||||
xxx/log-formatter-test.cpp:222: Leaving test suite "3 test cases inside"
|
||||
|
||||
* 2-format *******************************************************************
|
||||
<TestLog><TestSuite name="3 test cases inside" file="xxx/log-formatter-test.cpp" line="222"><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="223"><Error file="xxx/log-formatter-test.cpp" line="47"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="49"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="50"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="54"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="56"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_foo" file="xxx/log-formatter-test.cpp" line="224"><FatalError file="xxx/log-formatter-test.cpp" line="68"><![CDATA[very_bad_foo is fatal]]><Context><Frame><![CDATA[some context]]></Frame></Context></FatalError><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" skipped="yes" reason="dependency test case "Fake Test Suite Hierarchy/3 test cases inside/very_bad_foo" has failed"/></TestSuite></TestLog>
|
||||
<TestLog><TestSuite name="3 test cases inside" file="xxx/log-formatter-test.cpp" line="222"><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="223"><Error file="xxx/log-formatter-test.cpp" line="48"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="50"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="51"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="55"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="57"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_foo" file="xxx/log-formatter-test.cpp" line="224"><FatalError file="xxx/log-formatter-test.cpp" line="62"><![CDATA[very_bad_foo is fatal]]><Context><Frame><![CDATA[some context]]></Frame></Context></FatalError><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" skipped="yes" reason="dependency test case "Fake Test Suite Hierarchy/3 test cases inside/very_bad_foo" has failed"/></TestSuite></TestLog>
|
||||
* 3-format *******************************************************************
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite tests="0" skipped="1" errors="1" failures="2" id="0" name="3_test_cases_inside" time="0.1234">
|
||||
@@ -291,13 +291,13 @@ xxx/log-formatter-test.cpp:222: Leaving test suite "3 test cases inside"
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -307,17 +307,17 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-out><![CDATA[MESSAGE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 49
|
||||
- line : 50
|
||||
- message: this is a message
|
||||
|
||||
INFO:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 50
|
||||
- line : 51
|
||||
- message: check true has passed
|
||||
|
||||
]]></system-out>
|
||||
@@ -331,7 +331,7 @@ INFO:
|
||||
<failure message="failure" type="fatal error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 68
|
||||
- line : 62
|
||||
- message: very_bad_foo is fatal
|
||||
- context:
|
||||
- 'some context'
|
||||
@@ -357,13 +357,13 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -373,7 +373,7 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-err><![CDATA[Failures detected in:
|
||||
@@ -386,7 +386,7 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="fatal error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 68
|
||||
- line : 62
|
||||
- message: very_bad_foo is fatal
|
||||
- context:
|
||||
- 'some context'
|
||||
@@ -409,44 +409,44 @@ ASSERTION FAILURE:
|
||||
Running 4 test cases...
|
||||
xxx/log-formatter-test.cpp:230: Entering test suite "4 test cases inside"
|
||||
xxx/log-formatter-test.cpp:231: Entering test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:47: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo":
|
||||
xxx/log-formatter-test.cpp:48: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo":
|
||||
this is a message
|
||||
xxx/log-formatter-test.cpp:50: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:54: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": with some message
|
||||
xxx/log-formatter-test.cpp:51: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:55: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
xxx/log-formatter-test.cpp:56: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:57: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:231: Leaving test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:232: Entering test case "very_bad_foo"
|
||||
xxx/log-formatter-test.cpp:68: fatal error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_foo": very_bad_foo is fatal
|
||||
xxx/log-formatter-test.cpp:62: fatal error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_foo": very_bad_foo is fatal
|
||||
Failure occurred in a following context:
|
||||
some context
|
||||
xxx/log-formatter-test.cpp:232: Leaving test case "very_bad_foo"
|
||||
xxx/log-formatter-test.cpp:233: Entering test case "very_bad_exception"
|
||||
xxx/log-formatter-test.cpp:77: error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_exception": with some message
|
||||
xxx/log-formatter-test.cpp:71: error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_exception": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
unknown location:0: fatal error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_exception": unknown type
|
||||
xxx/log-formatter-test.cpp:77: last checkpoint
|
||||
xxx/log-formatter-test.cpp:71: last checkpoint
|
||||
Failure occurred in a following context:
|
||||
exception context should be shown
|
||||
xxx/log-formatter-test.cpp:233: Leaving test case "very_bad_exception"
|
||||
xxx/log-formatter-test.cpp:234: Entering test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:47: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo":
|
||||
xxx/log-formatter-test.cpp:48: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo":
|
||||
this is a message
|
||||
xxx/log-formatter-test.cpp:50: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:54: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": with some message
|
||||
xxx/log-formatter-test.cpp:51: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:55: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
xxx/log-formatter-test.cpp:56: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:57: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:234: Leaving test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:230: Leaving test suite "4 test cases inside"
|
||||
|
||||
* 2-format *******************************************************************
|
||||
<TestLog><TestSuite name="4 test cases inside" file="xxx/log-formatter-test.cpp" line="230"><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="231"><Error file="xxx/log-formatter-test.cpp" line="47"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="49"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="50"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="54"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="56"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_foo" file="xxx/log-formatter-test.cpp" line="232"><FatalError file="xxx/log-formatter-test.cpp" line="68"><![CDATA[very_bad_foo is fatal]]><Context><Frame><![CDATA[some context]]></Frame></Context></FatalError><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_exception" file="xxx/log-formatter-test.cpp" line="233"><Error file="xxx/log-formatter-test.cpp" line="77"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Exception file="unknown location" line="0"><![CDATA[unknown type]]><LastCheckpoint file="xxx/log-formatter-test.cpp" line="77"><![CDATA[]]></LastCheckpoint><Context><Frame><![CDATA[exception context should be shown]]></Frame></Context></Exception><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="234"><Error file="xxx/log-formatter-test.cpp" line="47"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="49"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="50"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="54"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="56"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite></TestLog>
|
||||
<TestLog><TestSuite name="4 test cases inside" file="xxx/log-formatter-test.cpp" line="230"><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="231"><Error file="xxx/log-formatter-test.cpp" line="48"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="50"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="51"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="55"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="57"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_foo" file="xxx/log-formatter-test.cpp" line="232"><FatalError file="xxx/log-formatter-test.cpp" line="62"><![CDATA[very_bad_foo is fatal]]><Context><Frame><![CDATA[some context]]></Frame></Context></FatalError><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_exception" file="xxx/log-formatter-test.cpp" line="233"><Error file="xxx/log-formatter-test.cpp" line="71"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Exception file="unknown location" line="0"><![CDATA[unknown type]]><LastCheckpoint file="xxx/log-formatter-test.cpp" line="71"><![CDATA[]]></LastCheckpoint><Context><Frame><![CDATA[exception context should be shown]]></Frame></Context></Exception><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="234"><Error file="xxx/log-formatter-test.cpp" line="48"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="50"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="51"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="55"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="57"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite></TestLog>
|
||||
* 3-format *******************************************************************
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite tests="0" skipped="0" errors="2" failures="4" id="0" name="4_test_cases_inside" time="0.1234">
|
||||
@@ -454,13 +454,13 @@ xxx/log-formatter-test.cpp:230: Leaving test suite "4 test cases inside"
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -470,17 +470,17 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-out><![CDATA[MESSAGE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 49
|
||||
- line : 50
|
||||
- message: this is a message
|
||||
|
||||
INFO:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 50
|
||||
- line : 51
|
||||
- message: check true has passed
|
||||
|
||||
]]></system-out>
|
||||
@@ -494,7 +494,7 @@ INFO:
|
||||
<failure message="failure" type="fatal error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 68
|
||||
- line : 62
|
||||
- message: very_bad_foo is fatal
|
||||
- context:
|
||||
- 'some context'
|
||||
@@ -510,7 +510,7 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 77
|
||||
- line : 71
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -530,7 +530,7 @@ unknown type
|
||||
Last checkpoint:
|
||||
- message: ""
|
||||
- file: log-formatter-test.cpp
|
||||
- line: 77
|
||||
- line: 71
|
||||
|
||||
|
||||
CONTEXT:
|
||||
@@ -545,13 +545,13 @@ CONTEXT:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -561,17 +561,17 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-out><![CDATA[MESSAGE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 49
|
||||
- line : 50
|
||||
- message: this is a message
|
||||
|
||||
INFO:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 50
|
||||
- line : 51
|
||||
- message: check true has passed
|
||||
|
||||
]]></system-out>
|
||||
@@ -589,13 +589,13 @@ INFO:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -605,7 +605,7 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-err><![CDATA[Failures detected in:
|
||||
@@ -618,7 +618,7 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="fatal error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 68
|
||||
- line : 62
|
||||
- message: very_bad_foo is fatal
|
||||
- context:
|
||||
- 'some context'
|
||||
@@ -634,7 +634,7 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 77
|
||||
- line : 71
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -654,7 +654,7 @@ unknown type
|
||||
Last checkpoint:
|
||||
- message: ""
|
||||
- file: log-formatter-test.cpp
|
||||
- line: 77
|
||||
- line: 71
|
||||
|
||||
|
||||
CONTEXT:
|
||||
@@ -669,13 +669,13 @@ CONTEXT:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -685,7 +685,7 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-err><![CDATA[Failures detected in:
|
||||
@@ -703,14 +703,14 @@ xxx/log-formatter-test.cpp:210: Entering test case "good_foo"
|
||||
Test case Fake Test Suite Hierarchy/1 test cases inside/good_foo did not check any assertions
|
||||
xxx/log-formatter-test.cpp:210: Leaving test case "good_foo"
|
||||
xxx/log-formatter-test.cpp:255: Entering test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:47: error: in "Fake Test Suite Hierarchy/1 test cases inside/bad_foo":
|
||||
xxx/log-formatter-test.cpp:48: error: in "Fake Test Suite Hierarchy/1 test cases inside/bad_foo":
|
||||
this is a message
|
||||
xxx/log-formatter-test.cpp:50: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:54: error: in "Fake Test Suite Hierarchy/1 test cases inside/bad_foo": with some message
|
||||
xxx/log-formatter-test.cpp:51: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:55: error: in "Fake Test Suite Hierarchy/1 test cases inside/bad_foo": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
xxx/log-formatter-test.cpp:56: error: in "Fake Test Suite Hierarchy/1 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:57: error: in "Fake Test Suite Hierarchy/1 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:255: Leaving test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:209: Leaving test suite "1 test cases inside"
|
||||
xxx/log-formatter-test.cpp:218: Entering test suite "2 test cases inside"
|
||||
@@ -718,58 +718,58 @@ xxx/log-formatter-test.cpp:219: Entering test case "good_foo"
|
||||
Test case Fake Test Suite Hierarchy/2 test cases inside/good_foo did not check any assertions
|
||||
xxx/log-formatter-test.cpp:219: Leaving test case "good_foo"
|
||||
xxx/log-formatter-test.cpp:220: Entering test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:47: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo":
|
||||
xxx/log-formatter-test.cpp:48: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo":
|
||||
this is a message
|
||||
xxx/log-formatter-test.cpp:50: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:54: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": with some message
|
||||
xxx/log-formatter-test.cpp:51: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:55: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
xxx/log-formatter-test.cpp:56: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:57: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:220: Leaving test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:218: Leaving test suite "2 test cases inside"
|
||||
xxx/log-formatter-test.cpp:230: Entering test suite "4 test cases inside"
|
||||
xxx/log-formatter-test.cpp:231: Entering test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:47: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo":
|
||||
xxx/log-formatter-test.cpp:48: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo":
|
||||
this is a message
|
||||
xxx/log-formatter-test.cpp:50: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:54: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": with some message
|
||||
xxx/log-formatter-test.cpp:51: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:55: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
xxx/log-formatter-test.cpp:56: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:57: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:231: Leaving test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:232: Entering test case "very_bad_foo"
|
||||
xxx/log-formatter-test.cpp:68: fatal error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_foo": very_bad_foo is fatal
|
||||
xxx/log-formatter-test.cpp:62: fatal error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_foo": very_bad_foo is fatal
|
||||
Failure occurred in a following context:
|
||||
some context
|
||||
xxx/log-formatter-test.cpp:232: Leaving test case "very_bad_foo"
|
||||
xxx/log-formatter-test.cpp:233: Entering test case "very_bad_exception"
|
||||
xxx/log-formatter-test.cpp:77: error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_exception": with some message
|
||||
xxx/log-formatter-test.cpp:71: error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_exception": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
unknown location:0: fatal error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_exception": unknown type
|
||||
xxx/log-formatter-test.cpp:77: last checkpoint
|
||||
xxx/log-formatter-test.cpp:71: last checkpoint
|
||||
Failure occurred in a following context:
|
||||
exception context should be shown
|
||||
xxx/log-formatter-test.cpp:233: Leaving test case "very_bad_exception"
|
||||
xxx/log-formatter-test.cpp:234: Entering test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:47: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo":
|
||||
xxx/log-formatter-test.cpp:48: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo":
|
||||
this is a message
|
||||
xxx/log-formatter-test.cpp:50: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:54: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": with some message
|
||||
xxx/log-formatter-test.cpp:51: info: check true has passed
|
||||
xxx/log-formatter-test.cpp:55: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": with some message
|
||||
Failure occurred in a following context:
|
||||
Context value=something
|
||||
Context value2=something different
|
||||
xxx/log-formatter-test.cpp:56: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:57: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense
|
||||
xxx/log-formatter-test.cpp:234: Leaving test case "bad_foo"
|
||||
xxx/log-formatter-test.cpp:230: Leaving test suite "4 test cases inside"
|
||||
xxx/log-formatter-test.cpp:222: Test suite "Fake Test Suite Hierarchy/3 test cases inside" is skipped because dependency test suite "Fake Test Suite Hierarchy/1 test cases inside" has failed
|
||||
xxx/log-formatter-test.cpp:236: Leaving test suite "Fake Test Suite Hierarchy"
|
||||
|
||||
* 2-format *******************************************************************
|
||||
<TestLog><TestSuite name="Fake Test Suite Hierarchy" file="xxx/log-formatter-test.cpp" line="236"><TestSuite name="1 test cases inside" file="xxx/log-formatter-test.cpp" line="209"><TestCase name="good_foo" file="xxx/log-formatter-test.cpp" line="210"><Message file="boost.test framework" line="212"><![CDATA[Test case Fake Test Suite Hierarchy/1 test cases inside/good_foo did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="255"><Error file="xxx/log-formatter-test.cpp" line="47"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="49"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="50"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="54"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="56"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite><TestSuite name="2 test cases inside" file="xxx/log-formatter-test.cpp" line="218"><TestCase name="good_foo" file="xxx/log-formatter-test.cpp" line="219"><Message file="boost.test framework" line="212"><![CDATA[Test case Fake Test Suite Hierarchy/2 test cases inside/good_foo did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="220"><Error file="xxx/log-formatter-test.cpp" line="47"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="49"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="50"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="54"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="56"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite><TestSuite name="4 test cases inside" file="xxx/log-formatter-test.cpp" line="230"><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="231"><Error file="xxx/log-formatter-test.cpp" line="47"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="49"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="50"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="54"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="56"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_foo" file="xxx/log-formatter-test.cpp" line="232"><FatalError file="xxx/log-formatter-test.cpp" line="68"><![CDATA[very_bad_foo is fatal]]><Context><Frame><![CDATA[some context]]></Frame></Context></FatalError><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_exception" file="xxx/log-formatter-test.cpp" line="233"><Error file="xxx/log-formatter-test.cpp" line="77"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Exception file="unknown location" line="0"><![CDATA[unknown type]]><LastCheckpoint file="xxx/log-formatter-test.cpp" line="77"><![CDATA[]]></LastCheckpoint><Context><Frame><![CDATA[exception context should be shown]]></Frame></Context></Exception><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="234"><Error file="xxx/log-formatter-test.cpp" line="47"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="49"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="50"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="54"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="56"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite><TestSuite name="3 test cases inside" skipped="yes" reason="dependency test suite "Fake Test Suite Hierarchy/1 test cases inside" has failed"/></TestSuite></TestLog>
|
||||
<TestLog><TestSuite name="Fake Test Suite Hierarchy" file="xxx/log-formatter-test.cpp" line="236"><TestSuite name="1 test cases inside" file="xxx/log-formatter-test.cpp" line="209"><TestCase name="good_foo" file="xxx/log-formatter-test.cpp" line="210"><Message file="boost.test framework" line="212"><![CDATA[Test case Fake Test Suite Hierarchy/1 test cases inside/good_foo did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="255"><Error file="xxx/log-formatter-test.cpp" line="48"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="50"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="51"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="55"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="57"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite><TestSuite name="2 test cases inside" file="xxx/log-formatter-test.cpp" line="218"><TestCase name="good_foo" file="xxx/log-formatter-test.cpp" line="219"><Message file="boost.test framework" line="212"><![CDATA[Test case Fake Test Suite Hierarchy/2 test cases inside/good_foo did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="220"><Error file="xxx/log-formatter-test.cpp" line="48"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="50"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="51"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="55"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="57"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite><TestSuite name="4 test cases inside" file="xxx/log-formatter-test.cpp" line="230"><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="231"><Error file="xxx/log-formatter-test.cpp" line="48"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="50"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="51"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="55"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="57"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_foo" file="xxx/log-formatter-test.cpp" line="232"><FatalError file="xxx/log-formatter-test.cpp" line="62"><![CDATA[very_bad_foo is fatal]]><Context><Frame><![CDATA[some context]]></Frame></Context></FatalError><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="very_bad_exception" file="xxx/log-formatter-test.cpp" line="233"><Error file="xxx/log-formatter-test.cpp" line="71"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Exception file="unknown location" line="0"><![CDATA[unknown type]]><LastCheckpoint file="xxx/log-formatter-test.cpp" line="71"><![CDATA[]]></LastCheckpoint><Context><Frame><![CDATA[exception context should be shown]]></Frame></Context></Exception><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="bad_foo" file="xxx/log-formatter-test.cpp" line="234"><Error file="xxx/log-formatter-test.cpp" line="48"><![CDATA[]]></Error><Message file="xxx/log-formatter-test.cpp" line="50"><![CDATA[this is a message]]></Message><Info file="xxx/log-formatter-test.cpp" line="51"><![CDATA[check true has passed]]></Info><Error file="xxx/log-formatter-test.cpp" line="55"><![CDATA[with some message]]><Context><Frame><![CDATA[Context value=something]]></Frame><Frame><![CDATA[Context value2=something different]]></Frame></Context></Error><Error file="xxx/log-formatter-test.cpp" line="57"><![CDATA[non sense]]></Error><TestingTime>ZZZ</TestingTime></TestCase></TestSuite><TestSuite name="3 test cases inside" skipped="yes" reason="dependency test suite "Fake Test Suite Hierarchy/1 test cases inside" has failed"/></TestSuite></TestLog>
|
||||
* 3-format *******************************************************************
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite tests="2" skipped="3" errors="2" failures="6" id="0" name="Fake_Test_Suite_Hierarchy" time="0.1234">
|
||||
@@ -785,13 +785,13 @@ xxx/log-formatter-test.cpp:236: Leaving test suite "Fake Test Suite Hierarchy"
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -801,17 +801,17 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-out><![CDATA[MESSAGE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 49
|
||||
- line : 50
|
||||
- message: this is a message
|
||||
|
||||
INFO:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 50
|
||||
- line : 51
|
||||
- message: check true has passed
|
||||
|
||||
]]></system-out>
|
||||
@@ -833,13 +833,13 @@ INFO:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -849,17 +849,17 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-out><![CDATA[MESSAGE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 49
|
||||
- line : 50
|
||||
- message: this is a message
|
||||
|
||||
INFO:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 50
|
||||
- line : 51
|
||||
- message: check true has passed
|
||||
|
||||
]]></system-out>
|
||||
@@ -894,13 +894,13 @@ INFO:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -910,17 +910,17 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-out><![CDATA[MESSAGE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 49
|
||||
- line : 50
|
||||
- message: this is a message
|
||||
|
||||
INFO:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 50
|
||||
- line : 51
|
||||
- message: check true has passed
|
||||
|
||||
]]></system-out>
|
||||
@@ -934,7 +934,7 @@ INFO:
|
||||
<failure message="failure" type="fatal error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 68
|
||||
- line : 62
|
||||
- message: very_bad_foo is fatal
|
||||
- context:
|
||||
- 'some context'
|
||||
@@ -950,7 +950,7 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 77
|
||||
- line : 71
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -970,7 +970,7 @@ unknown type
|
||||
Last checkpoint:
|
||||
- message: ""
|
||||
- file: log-formatter-test.cpp
|
||||
- line: 77
|
||||
- line: 71
|
||||
|
||||
|
||||
CONTEXT:
|
||||
@@ -985,13 +985,13 @@ CONTEXT:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -1001,17 +1001,17 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-out><![CDATA[MESSAGE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 49
|
||||
- line : 50
|
||||
- message: this is a message
|
||||
|
||||
INFO:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 50
|
||||
- line : 51
|
||||
- message: check true has passed
|
||||
|
||||
]]></system-out>
|
||||
@@ -1031,13 +1031,13 @@ INFO:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -1047,7 +1047,7 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-err><![CDATA[Failures detected in:
|
||||
@@ -1062,13 +1062,13 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -1078,7 +1078,7 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-err><![CDATA[Failures detected in:
|
||||
@@ -1112,13 +1112,13 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -1128,7 +1128,7 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-err><![CDATA[Failures detected in:
|
||||
@@ -1141,7 +1141,7 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="fatal error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 68
|
||||
- line : 62
|
||||
- message: very_bad_foo is fatal
|
||||
- context:
|
||||
- 'some context'
|
||||
@@ -1157,7 +1157,7 @@ ASSERTION FAILURE:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 77
|
||||
- line : 71
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -1177,7 +1177,7 @@ unknown type
|
||||
Last checkpoint:
|
||||
- message: ""
|
||||
- file: log-formatter-test.cpp
|
||||
- line: 77
|
||||
- line: 71
|
||||
|
||||
|
||||
CONTEXT:
|
||||
@@ -1192,13 +1192,13 @@ CONTEXT:
|
||||
<failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 47
|
||||
- line : 48
|
||||
- message:
|
||||
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 54
|
||||
- line : 55
|
||||
- message: with some message
|
||||
- context:
|
||||
- 'Context value=something'
|
||||
@@ -1208,7 +1208,7 @@ ASSERTION FAILURE:
|
||||
]]></failure><failure message="failure" type="assertion error"><![CDATA[
|
||||
ASSERTION FAILURE:
|
||||
- file : log-formatter-test.cpp
|
||||
- line : 56
|
||||
- line : 57
|
||||
- message: non sense
|
||||
|
||||
]]></failure><system-err><![CDATA[Failures detected in:
|
||||
|
||||
85
test/baseline-outputs/messages-in-datasets-test.pattern
Normal file
85
test/baseline-outputs/messages-in-datasets-test.pattern
Normal file
@@ -0,0 +1,85 @@
|
||||
* 1-format *******************************************************************
|
||||
Running 2 test cases...
|
||||
xxx/message-in-datatestcase-test.cpp:131: Entering test suite "fake_datatest_case"
|
||||
xxx/message-in-datatestcase-test.cpp:200: Entering test case "_0"
|
||||
Testing update :
|
||||
[context:
|
||||
sample = util/test_image1.jpg; ]
|
||||
Update Volume with 100
|
||||
[context:
|
||||
sample = util/test_image1.jpg; ]
|
||||
Test case fake_datatest_case/_0 did not check any assertions
|
||||
xxx/message-in-datatestcase-test.cpp:200: Leaving test case "_0"
|
||||
xxx/message-in-datatestcase-test.cpp:200: Entering test case "_1"
|
||||
Testing update :
|
||||
[context:
|
||||
sample = util/test_image2.jpg; ]
|
||||
Update Volume with 100
|
||||
[context:
|
||||
sample = util/test_image2.jpg; ]
|
||||
Test case fake_datatest_case/_1 did not check any assertions
|
||||
xxx/message-in-datatestcase-test.cpp:200: Leaving test case "_1"
|
||||
xxx/message-in-datatestcase-test.cpp:131: Leaving test suite "fake_datatest_case"
|
||||
|
||||
* 2-format *******************************************************************
|
||||
<TestLog><TestSuite name="fake_datatest_case" file="xxx/message-in-datatestcase-test.cpp" line="131"><TestCase name="_0" file="xxx/message-in-datatestcase-test.cpp" line="200"><Message file="xxx/message-in-datatestcase-test.cpp" line="42"><![CDATA[Testing update :]]><Context><Frame><![CDATA[sample = util/test_image1.jpg; ]]></Frame></Context></Message><Message file="xxx/message-in-datatestcase-test.cpp" line="43"><![CDATA[Update Volume with 100]]><Context><Frame><![CDATA[sample = util/test_image1.jpg; ]]></Frame></Context></Message><Message file="boost.test framework" line="212"><![CDATA[Test case fake_datatest_case/_0 did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase><TestCase name="_1" file="xxx/message-in-datatestcase-test.cpp" line="200"><Message file="xxx/message-in-datatestcase-test.cpp" line="42"><![CDATA[Testing update :]]><Context><Frame><![CDATA[sample = util/test_image2.jpg; ]]></Frame></Context></Message><Message file="xxx/message-in-datatestcase-test.cpp" line="43"><![CDATA[Update Volume with 100]]><Context><Frame><![CDATA[sample = util/test_image2.jpg; ]]></Frame></Context></Message><Message file="boost.test framework" line="212"><![CDATA[Test case fake_datatest_case/_1 did not check any assertions]]></Message><TestingTime>ZZZ</TestingTime></TestCase></TestSuite></TestLog>
|
||||
* 3-format *******************************************************************
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite tests="2" skipped="0" errors="0" failures="0" id="0" name="fake_datatest_case" time="0.1234">
|
||||
<testcase assertions="0" name="_0" time="0.1234">
|
||||
<system-out><![CDATA[MESSAGE:
|
||||
- file : message-in-datatestcase-test.cpp
|
||||
- line : 42
|
||||
- message: Testing update :
|
||||
- context:
|
||||
- 'sample = util/test_image1.jpg; '
|
||||
|
||||
|
||||
MESSAGE:
|
||||
- file : message-in-datatestcase-test.cpp
|
||||
- line : 43
|
||||
- message: Update Volume with 100
|
||||
- context:
|
||||
- 'sample = util/test_image1.jpg; '
|
||||
|
||||
|
||||
MESSAGE:
|
||||
- file : boost.test framework
|
||||
- line : 212
|
||||
- message: Test case fake_datatest_case/_0 did not check any assertions
|
||||
|
||||
]]></system-out>
|
||||
</testcase>
|
||||
<testcase assertions="0" name="_1" time="0.1234">
|
||||
<system-out><![CDATA[MESSAGE:
|
||||
- file : message-in-datatestcase-test.cpp
|
||||
- line : 42
|
||||
- message: Testing update :
|
||||
- context:
|
||||
- 'sample = util/test_image2.jpg; '
|
||||
|
||||
|
||||
MESSAGE:
|
||||
- file : message-in-datatestcase-test.cpp
|
||||
- line : 43
|
||||
- message: Update Volume with 100
|
||||
- context:
|
||||
- 'sample = util/test_image2.jpg; '
|
||||
|
||||
|
||||
MESSAGE:
|
||||
- file : boost.test framework
|
||||
- line : 212
|
||||
- message: Test case fake_datatest_case/_1 did not check any assertions
|
||||
|
||||
]]></system-out>
|
||||
</testcase>
|
||||
</testsuite>
|
||||
* 3-format *******************************************************************
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite tests="2" skipped="0" errors="0" failures="0" id="0" name="fake_datatest_case" time="0.1234">
|
||||
<testcase assertions="0" name="_0" time="0.1234">
|
||||
</testcase>
|
||||
<testcase assertions="0" name="_1" time="0.1234">
|
||||
</testcase>
|
||||
</testsuite>
|
||||
@@ -13,17 +13,18 @@
|
||||
#define BOOST_TEST_MAIN
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/unit_test_log.hpp>
|
||||
#include <boost/test/tools/output_test_stream.hpp>
|
||||
#include <boost/test/unit_test_suite.hpp>
|
||||
#include <boost/test/framework.hpp>
|
||||
#include <boost/test/unit_test_parameters.hpp>
|
||||
#include <boost/test/utils/nullstream.hpp>
|
||||
typedef boost::onullstream onullstream_type;
|
||||
#include <boost/test/utils/algorithm.hpp>
|
||||
|
||||
// BOOST
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
// our special logger for tests
|
||||
#include "logger-for-tests.hpp"
|
||||
|
||||
// STL
|
||||
#include <iostream>
|
||||
#include <ios>
|
||||
@@ -56,13 +57,6 @@ void bad_foo() {
|
||||
BOOST_CHECK_MESSAGE( 1 == 2.3, "non sense" );
|
||||
}
|
||||
|
||||
struct log_guard {
|
||||
~log_guard()
|
||||
{
|
||||
unit_test_log.set_stream( std::cout );
|
||||
}
|
||||
};
|
||||
|
||||
void very_bad_foo() {
|
||||
BOOST_TEST_CONTEXT("some context") {
|
||||
BOOST_FAIL( "very_bad_foo is fatal" );
|
||||
@@ -126,89 +120,6 @@ struct guard {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class output_test_stream_for_loggers : public output_test_stream {
|
||||
|
||||
public:
|
||||
explicit output_test_stream_for_loggers(
|
||||
boost::unit_test::const_string pattern_file_name = boost::unit_test::const_string(),
|
||||
bool match_or_save = true,
|
||||
bool text_or_binary = true )
|
||||
: output_test_stream(pattern_file_name, match_or_save, text_or_binary)
|
||||
{}
|
||||
|
||||
static std::string normalize_path(const std::string &str) {
|
||||
const std::string to_look_for[] = {"\\"};
|
||||
const std::string to_replace[] = {"/"};
|
||||
return utils::replace_all_occurrences_of(
|
||||
str,
|
||||
to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]),
|
||||
to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0])
|
||||
);
|
||||
}
|
||||
|
||||
static std::string get_basename() {
|
||||
static std::string basename;
|
||||
|
||||
if(basename.empty()) {
|
||||
basename = normalize_path(__FILE__);
|
||||
std::string::size_type basename_pos = basename.rfind('/');
|
||||
if(basename_pos != std::string::npos) {
|
||||
basename = basename.substr(basename_pos+1);
|
||||
}
|
||||
}
|
||||
return basename;
|
||||
}
|
||||
|
||||
virtual std::string get_stream_string_representation() const {
|
||||
std::string current_string = output_test_stream::get_stream_string_representation();
|
||||
|
||||
std::string pathname_fixes;
|
||||
{
|
||||
static const std::string to_look_for[] = {normalize_path(__FILE__)};
|
||||
static const std::string to_replace[] = {"xxx/" + get_basename() };
|
||||
pathname_fixes = utils::replace_all_occurrences_of(
|
||||
current_string,
|
||||
to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]),
|
||||
to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0])
|
||||
);
|
||||
}
|
||||
|
||||
std::string other_vars_fixes;
|
||||
{
|
||||
static const std::string to_look_for[] = {"time=\"*\"",
|
||||
get_basename() + "(*):",
|
||||
"unknown location(*):",
|
||||
"; testing time: *us\n", // removing this is far more easier than adding a testing time
|
||||
"; testing time: *ms\n",
|
||||
"<TestingTime>*</TestingTime>",
|
||||
"condition 2>3 is not satisfied\n",
|
||||
"condition 2>3 is not satisfied]",
|
||||
};
|
||||
|
||||
static const std::string to_replace[] = {"time=\"0.1234\"",
|
||||
get_basename() + ":*:" ,
|
||||
"unknown location:*:",
|
||||
"\n",
|
||||
"\n",
|
||||
"<TestingTime>ZZZ</TestingTime>",
|
||||
"condition 2>3 is not satisfied [2 <= 3]\n",
|
||||
"condition 2>3 is not satisfied [2 <= 3]]",
|
||||
};
|
||||
|
||||
other_vars_fixes = utils::replace_all_occurrences_with_wildcards(
|
||||
pathname_fixes,
|
||||
to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]),
|
||||
to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0])
|
||||
);
|
||||
}
|
||||
|
||||
return other_vars_fixes;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
|
||||
@@ -224,7 +135,10 @@ BOOST_AUTO_TEST_CASE( test_result_reports )
|
||||
? (runtime_config::save_pattern() ? PATTERN_FILE_NAME : "./baseline-outputs/" PATTERN_FILE_NAME )
|
||||
: framework::master_test_suite().argv[1] );
|
||||
|
||||
output_test_stream_for_loggers test_output( pattern_file_name, !runtime_config::save_pattern() );
|
||||
output_test_stream_for_loggers test_output( pattern_file_name,
|
||||
!runtime_config::save_pattern(),
|
||||
true,
|
||||
__FILE__ );
|
||||
|
||||
#line 207
|
||||
test_suite* ts_0 = BOOST_TEST_SUITE( "0 test cases inside" );
|
||||
|
||||
105
test/framework-ts/logger-for-tests.hpp
Normal file
105
test/framework-ts/logger-for-tests.hpp
Normal file
@@ -0,0 +1,105 @@
|
||||
// (C) Copyright Raffi Enficiaud 2017.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (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.
|
||||
//
|
||||
// tests Unit Test Framework logging facilities against
|
||||
// pattern file
|
||||
// ***************************************************************************
|
||||
|
||||
|
||||
#ifndef BOOST_TEST_TESTS_LOGGER_FOR_TESTS_HPP__
|
||||
#define BOOST_TEST_TESTS_LOGGER_FOR_TESTS_HPP__
|
||||
|
||||
#include <boost/test/tools/output_test_stream.hpp>
|
||||
#include <boost/test/utils/algorithm.hpp>
|
||||
|
||||
using namespace boost::unit_test;
|
||||
using boost::test_tools::output_test_stream;
|
||||
|
||||
class output_test_stream_for_loggers : public output_test_stream {
|
||||
|
||||
std::string const source_filename;
|
||||
std::string const basename;
|
||||
|
||||
public:
|
||||
explicit output_test_stream_for_loggers(
|
||||
boost::unit_test::const_string pattern_file_name = boost::unit_test::const_string(),
|
||||
bool match_or_save = true,
|
||||
bool text_or_binary = true,
|
||||
const std::string& source_filename_ = __FILE__)
|
||||
: output_test_stream(pattern_file_name, match_or_save, text_or_binary)
|
||||
, source_filename(source_filename_)
|
||||
, basename(get_basename(source_filename_))
|
||||
{}
|
||||
|
||||
static std::string normalize_path(const std::string &str) {
|
||||
const std::string to_look_for[] = {"\\"};
|
||||
const std::string to_replace[] = {"/"};
|
||||
return utils::replace_all_occurrences_of(
|
||||
str,
|
||||
to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]),
|
||||
to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0])
|
||||
);
|
||||
}
|
||||
|
||||
static std::string get_basename(const std::string &source_filename) {
|
||||
std::string basename = normalize_path(source_filename);
|
||||
std::string::size_type basename_pos = basename.rfind('/');
|
||||
if(basename_pos != std::string::npos) {
|
||||
basename = basename.substr(basename_pos+1);
|
||||
}
|
||||
return basename;
|
||||
}
|
||||
|
||||
virtual std::string get_stream_string_representation() const {
|
||||
std::string current_string = output_test_stream::get_stream_string_representation();
|
||||
|
||||
std::string pathname_fixes;
|
||||
{
|
||||
const std::string to_look_for[] = {normalize_path(source_filename)};
|
||||
const std::string to_replace[] = {"xxx/" + basename };
|
||||
pathname_fixes = utils::replace_all_occurrences_of(
|
||||
current_string,
|
||||
to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]),
|
||||
to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0])
|
||||
);
|
||||
}
|
||||
|
||||
std::string other_vars_fixes;
|
||||
{
|
||||
const std::string to_look_for[] = {"time=\"*\"",
|
||||
basename + "(*):",
|
||||
"unknown location(*):",
|
||||
"; testing time: *us\n", // removing this is far more easier than adding a testing time
|
||||
"; testing time: *ms\n",
|
||||
"<TestingTime>*</TestingTime>",
|
||||
"condition 2>3 is not satisfied\n",
|
||||
"condition 2>3 is not satisfied]",
|
||||
};
|
||||
|
||||
const std::string to_replace[] = {"time=\"0.1234\"",
|
||||
basename + ":*:" ,
|
||||
"unknown location:*:",
|
||||
"\n",
|
||||
"\n",
|
||||
"<TestingTime>ZZZ</TestingTime>",
|
||||
"condition 2>3 is not satisfied [2 <= 3]\n",
|
||||
"condition 2>3 is not satisfied [2 <= 3]]",
|
||||
};
|
||||
|
||||
other_vars_fixes = utils::replace_all_occurrences_with_wildcards(
|
||||
pathname_fixes,
|
||||
to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]),
|
||||
to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0])
|
||||
);
|
||||
}
|
||||
|
||||
return other_vars_fixes;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif /* BOOST_TEST_TESTS_LOGGER_FOR_TESTS_HPP__ */
|
||||
137
test/framework-ts/message-in-datatestcase-test.cpp
Normal file
137
test/framework-ts/message-in-datatestcase-test.cpp
Normal file
@@ -0,0 +1,137 @@
|
||||
// (C) Copyright Raffi Enficiaud 2017.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (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.
|
||||
|
||||
#define BOOST_TEST_MODULE message in dataset
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/test/unit_test_suite.hpp>
|
||||
#include <boost/test/unit_test_log.hpp>
|
||||
#include <boost/test/results_collector.hpp>
|
||||
#include <boost/test/data/monomorphic.hpp>
|
||||
#include <boost/test/data/test_case.hpp>
|
||||
|
||||
#include <boost/test/framework.hpp>
|
||||
#include <boost/test/unit_test_parameters.hpp>
|
||||
#include <boost/test/utils/nullstream.hpp>
|
||||
|
||||
#include "logger-for-tests.hpp"
|
||||
|
||||
// STL
|
||||
#include <iostream>
|
||||
#include <ios>
|
||||
|
||||
|
||||
using boost::test_tools::output_test_stream;
|
||||
using namespace boost::unit_test;
|
||||
|
||||
|
||||
|
||||
#line 34
|
||||
std::string filenames[] = { "util/test_image1.jpg", "util/test_image2.jpg" };
|
||||
BOOST_DATA_TEST_CASE(test_update,
|
||||
boost::unit_test::data::make(filenames))
|
||||
{
|
||||
std::string field_name = "Volume";
|
||||
int value = 100;
|
||||
|
||||
BOOST_TEST_MESSAGE("Testing update :");
|
||||
BOOST_TEST_MESSAGE("Update " << field_name << " with " << value);
|
||||
}
|
||||
|
||||
void check_pattern_loggers(
|
||||
output_test_stream& output,
|
||||
output_format log_format,
|
||||
test_unit_id id,
|
||||
bool bt_module_failed = false,
|
||||
log_level ll = log_successful_tests )
|
||||
{
|
||||
boost::unit_test::unit_test_log.set_format(log_format);
|
||||
boost::unit_test::unit_test_log.set_stream(output);
|
||||
boost::unit_test::unit_test_log.set_threshold_level(ll);
|
||||
|
||||
// output before fixture registration
|
||||
output << "* " << log_format << "-format *******************************************************************";
|
||||
output << std::endl;
|
||||
|
||||
framework::finalize_setup_phase( id );
|
||||
|
||||
bool setup_error_caught = false;
|
||||
try {
|
||||
framework::run( id, false ); // do not continue the test tree to have the test_log_start/end
|
||||
}
|
||||
catch (framework::setup_error&) {
|
||||
BOOST_TEST_MESSAGE("Framework setup_error caught");
|
||||
setup_error_caught = true;
|
||||
}
|
||||
|
||||
output << std::endl;
|
||||
|
||||
// we do not want the result of the comparison go to the "output" stream
|
||||
boost::unit_test::unit_test_log.set_format(OF_CLF);
|
||||
boost::unit_test::unit_test_log.set_stream(std::cout);
|
||||
|
||||
BOOST_TEST( bt_module_failed == (( results_collector.results( id ).result_code() != 0 ) ));
|
||||
BOOST_TEST( output.match_pattern(true) ); // flushes the stream at the end of the comparison.
|
||||
}
|
||||
|
||||
void check_pattern_loggers(
|
||||
output_test_stream& output,
|
||||
test_suite* ts,
|
||||
bool bt_module_failed = false)
|
||||
{
|
||||
ts->p_default_status.value = test_unit::RS_ENABLED;
|
||||
|
||||
check_pattern_loggers( output, OF_CLF, ts->p_id, bt_module_failed );
|
||||
check_pattern_loggers( output, OF_XML, ts->p_id, bt_module_failed );
|
||||
check_pattern_loggers( output, OF_JUNIT, ts->p_id, bt_module_failed, log_successful_tests );
|
||||
check_pattern_loggers( output, OF_JUNIT, ts->p_id, bt_module_failed, log_cpp_exception_errors ); // should branch to the log log_all_errors
|
||||
}
|
||||
|
||||
struct guard {
|
||||
~guard()
|
||||
{
|
||||
boost::unit_test::unit_test_log.set_format( runtime_config::get<output_format>( runtime_config::btrt_log_format ) );
|
||||
boost::unit_test::unit_test_log.set_stream( std::cout );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( messages_in_datasets )
|
||||
{
|
||||
guard G;
|
||||
ut_detail::ignore_unused_variable_warning( G );
|
||||
|
||||
#define PATTERN_FILE_NAME "messages-in-datasets-test.pattern"
|
||||
|
||||
std::string pattern_file_name(
|
||||
framework::master_test_suite().argc == 1
|
||||
? (runtime_config::save_pattern() ? PATTERN_FILE_NAME : "./baseline-outputs/" PATTERN_FILE_NAME )
|
||||
: framework::master_test_suite().argv[1] );
|
||||
|
||||
output_test_stream_for_loggers test_output( pattern_file_name,
|
||||
!runtime_config::save_pattern(),
|
||||
true,
|
||||
__FILE__ );
|
||||
|
||||
auto dataset = boost::unit_test::data::make(filenames);
|
||||
|
||||
test_unit_generator const& generator = boost::unit_test::data::ds_detail::test_case_gen<test_updatecase, decltype(dataset)>(
|
||||
"fake_name",
|
||||
__FILE__,
|
||||
200,
|
||||
std::forward<decltype(dataset)>(dataset) );
|
||||
test_suite* ts = BOOST_TEST_SUITE( "fake_datatest_case" );
|
||||
while(test_unit *tu = generator.next()) {
|
||||
ts->add(tu);
|
||||
}
|
||||
|
||||
check_pattern_loggers(test_output, ts);
|
||||
}
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/unit_test_log.hpp>
|
||||
#include <boost/test/results_collector.hpp>
|
||||
#include <boost/test/tools/output_test_stream.hpp>
|
||||
#include <boost/test/unit_test_suite.hpp>
|
||||
#include <boost/test/framework.hpp>
|
||||
#include <boost/test/unit_test_parameters.hpp>
|
||||
@@ -22,6 +21,9 @@ typedef boost::onullstream onullstream_type;
|
||||
// BOOST
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
// our special logger for tests
|
||||
#include "logger-for-tests.hpp"
|
||||
|
||||
// STL
|
||||
#include <iostream>
|
||||
#include <ios>
|
||||
@@ -161,13 +163,6 @@ void bad_foo() {
|
||||
BOOST_CHECK_MESSAGE( 1 == 2.3, "non sense" );
|
||||
}
|
||||
|
||||
struct log_guard {
|
||||
~log_guard()
|
||||
{
|
||||
unit_test_log.set_stream( std::cout );
|
||||
}
|
||||
};
|
||||
|
||||
void very_bad_foo() {
|
||||
BOOST_TEST_CONTEXT("some context") {
|
||||
BOOST_FAIL( "very_bad_foo is fatal" );
|
||||
@@ -185,94 +180,11 @@ void very_bad_exception() {
|
||||
throw local_exception();
|
||||
}
|
||||
|
||||
// to factorize out with the logger test
|
||||
class output_test_stream_for_loggers : public output_test_stream {
|
||||
|
||||
public:
|
||||
explicit output_test_stream_for_loggers(
|
||||
boost::unit_test::const_string pattern_file_name = boost::unit_test::const_string(),
|
||||
bool match_or_save = true,
|
||||
bool text_or_binary = true )
|
||||
: output_test_stream(pattern_file_name, match_or_save, text_or_binary)
|
||||
{}
|
||||
|
||||
static std::string normalize_path(const std::string &str) {
|
||||
const std::string to_look_for[] = {"\\"};
|
||||
const std::string to_replace[] = {"/"};
|
||||
return utils::replace_all_occurrences_of(
|
||||
str,
|
||||
to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]),
|
||||
to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0])
|
||||
);
|
||||
}
|
||||
|
||||
static std::string get_basename() {
|
||||
static std::string basename;
|
||||
|
||||
if(basename.empty()) {
|
||||
basename = normalize_path(__FILE__);
|
||||
std::string::size_type basename_pos = basename.rfind('/');
|
||||
if(basename_pos != std::string::npos) {
|
||||
basename = basename.substr(basename_pos+1);
|
||||
}
|
||||
}
|
||||
return basename;
|
||||
}
|
||||
|
||||
virtual std::string get_stream_string_representation() const {
|
||||
std::string current_string = output_test_stream::get_stream_string_representation();
|
||||
|
||||
std::string pathname_fixes;
|
||||
{
|
||||
static const std::string to_look_for[] = {normalize_path(__FILE__)};
|
||||
static const std::string to_replace[] = {"xxx/" + get_basename() };
|
||||
pathname_fixes = utils::replace_all_occurrences_of(
|
||||
current_string,
|
||||
to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]),
|
||||
to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0])
|
||||
);
|
||||
}
|
||||
|
||||
std::string other_vars_fixes;
|
||||
{
|
||||
static const std::string to_look_for[] = {"time=\"*\"",
|
||||
get_basename() + "(*):",
|
||||
"unknown location(*):",
|
||||
"; testing time: *us\n", // removing this is far more easier than adding a testing time
|
||||
"; testing time: *ms\n",
|
||||
"<TestingTime>*</TestingTime>",
|
||||
"condition 2>3 is not satisfied\n",
|
||||
"condition 2>3 is not satisfied]",
|
||||
};
|
||||
|
||||
static const std::string to_replace[] = {"time=\"0.1234\"",
|
||||
get_basename() + ":*:" ,
|
||||
"unknown location:*:",
|
||||
"\n",
|
||||
"\n",
|
||||
"<TestingTime>ZZZ</TestingTime>",
|
||||
"condition 2>3 is not satisfied [2 <= 3]\n",
|
||||
"condition 2>3 is not satisfied [2 <= 3]]",
|
||||
};
|
||||
|
||||
other_vars_fixes = utils::replace_all_occurrences_with_wildcards(
|
||||
pathname_fixes,
|
||||
to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]),
|
||||
to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0])
|
||||
);
|
||||
}
|
||||
|
||||
return other_vars_fixes;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( some_test )
|
||||
{
|
||||
guard G;
|
||||
ut_detail::ignore_unused_variable_warning( G );
|
||||
|
||||
#line 275
|
||||
test_suite* ts_1 = BOOST_TEST_SUITE( "1 test cases inside" );
|
||||
ts_1->add( BOOST_TEST_CASE( good_foo ) );
|
||||
|
||||
@@ -304,7 +216,10 @@ BOOST_AUTO_TEST_CASE( some_test )
|
||||
: framework::master_test_suite().argv[1] );
|
||||
|
||||
|
||||
output_test_stream_for_loggers test_output( pattern_file_name, !runtime_config::save_pattern() );
|
||||
output_test_stream_for_loggers test_output( pattern_file_name,
|
||||
!runtime_config::save_pattern(),
|
||||
true,
|
||||
__FILE__ );
|
||||
|
||||
// legacy API, we test that we catch exceptions in the ctor, and tests
|
||||
// in the suite are running or not depending on that
|
||||
|
||||
Reference in New Issue
Block a user