Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest
diff options
context:
space:
mode:
authorMartin Hořeňovský2026-07-28 22:08:55 +0200
committerMartin Hořeňovský2026-08-08 00:05:18 +0200
commit4cde12851773b32fc5a0171f262e4281c8e28b01 (patch)
treecdd11d3c9c86a2a6c9ba15fdfe69fd9555ecf850 /tests/SelfTest
parent0b4d7a5a1696dbdfb23fccad8c50db9dc9a417ea (diff)
downloadcatch3-4cde12851773b32fc5a0171f262e4281c8e28b01.tar.gz
JSONReporter considers verbosity when listing tests
* Quiet verbosity provides just the test names * Normal verbosity adds tags * High verbosity add the source location of the tests Listing tests with the quiet verbosity results in about 1/4 of the previous output, which leads to measurably faster execution of `catch_discover_tests` when it does not need tags for labels. (If it does need tags, the output is about 1/2 of previous).
Diffstat (limited to 'tests/SelfTest')
-rw-r--r--tests/SelfTest/Baselines/compact.sw.approved.txt6
-rw-r--r--tests/SelfTest/Baselines/compact.sw.multi.approved.txt6
-rw-r--r--tests/SelfTest/Baselines/console.sw.approved.txt6
-rw-r--r--tests/SelfTest/Baselines/console.sw.multi.approved.txt6
-rw-r--r--tests/SelfTest/Baselines/tap.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/tap.sw.multi.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/xml.sw.approved.txt6
-rw-r--r--tests/SelfTest/Baselines/xml.sw.multi.approved.txt6
8 files changed, 8 insertions, 32 deletions
diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt
index 94898c37..673c9dd7 100644
--- a/tests/SelfTest/Baselines/compact.sw.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.approved.txt
@@ -1740,11 +1740,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fa
"name": "fake test name",
"tags": [
"fakeTestTag"
- ],
- "source-location": {
- "filename": "fake-file.cpp",
- "line": 123456789
- }
+ ]
}
]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
index 2d268b2f..73195967 100644
--- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
@@ -1738,11 +1738,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fa
"name": "fake test name",
"tags": [
"fakeTestTag"
- ],
- "source-location": {
- "filename": "fake-file.cpp",
- "line": 123456789
- }
+ ]
}
]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt
index 9d8fa88f..6ec67e3f 100644
--- a/tests/SelfTest/Baselines/console.sw.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.approved.txt
@@ -11323,11 +11323,7 @@ with expansion:
"name": "fake test name",
"tags": [
"fakeTestTag"
- ],
- "source-location": {
- "filename": "fake-file.cpp",
- "line": 123456789
- }
+ ]
}
]" ( contains: "fake test name" and contains: "fakeTestTag" )
with message:
diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
index fcdf5f9f..9af23aa5 100644
--- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
@@ -11321,11 +11321,7 @@ with expansion:
"name": "fake test name",
"tags": [
"fakeTestTag"
- ],
- "source-location": {
- "filename": "fake-file.cpp",
- "line": 123456789
- }
+ ]
}
]" ( contains: "fake test name" and contains: "fakeTestTag" )
with message:
diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt
index 657b86ff..69476eef 100644
--- a/tests/SelfTest/Baselines/tap.sw.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.approved.txt
@@ -2775,7 +2775,7 @@ ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
-ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 2, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tests": [ { "name": "fake test name", "tags": [ "fakeTestTag" ], "source-location": { "filename": "fake-file.cpp", "line": 123456789 } } ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON'
+ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 2, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tests": [ { "name": "fake test name", "tags": [ "fakeTestTag" ] } ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
index 5626093a..01b8a422 100644
--- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
@@ -2773,7 +2773,7 @@ ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
-ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 2, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tests": [ { "name": "fake test name", "tags": [ "fakeTestTag" ], "source-location": { "filename": "fake-file.cpp", "line": 123456789 } } ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON'
+ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 2, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tests": [ { "name": "fake test name", "tags": [ "fakeTestTag" ] } ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt
index 42b41eca..d48496b9 100644
--- a/tests/SelfTest/Baselines/xml.sw.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.approved.txt
@@ -13503,11 +13503,7 @@ Approx( 0.98999999999999999 )
"name": "fake test name",
"tags": [
"fakeTestTag"
- ],
- "source-location": {
- "filename": "fake-file.cpp",
- "line": 123456789
- }
+ ]
}
]" ( contains: "fake test name" and contains: "fakeTestTag" )
</Expanded>
diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
index 3d265d40..db82d34d 100644
--- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
@@ -13503,11 +13503,7 @@ Approx( 0.98999999999999999 )
"name": "fake test name",
"tags": [
"fakeTestTag"
- ],
- "source-location": {
- "filename": "fake-file.cpp",
- "line": 123456789
- }
+ ]
}
]" ( contains: "fake test name" and contains: "fakeTestTag" )
</Expanded>