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

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2026-07-29 10:05:39 +0200
committerMartin Hořeňovský2026-08-07 23:07:46 +0200
commit0b4d7a5a1696dbdfb23fccad8c50db9dc9a417ea (patch)
treeaf1ee599454f1b28220c2c78c5e22ea16200b942 /tests
parenta0eba50e9d56c743aff1de7a50d02a6e01e73cdc (diff)
downloadcatch3-0b4d7a5a1696dbdfb23fccad8c50db9dc9a417ea.tar.gz
JSONReporter's listTests only lists class-name if it is non-empty
Diffstat (limited to 'tests')
-rw-r--r--tests/SelfTest/Baselines/compact.sw.approved.txt7
-rw-r--r--tests/SelfTest/Baselines/compact.sw.multi.approved.txt7
-rw-r--r--tests/SelfTest/Baselines/console.sw.approved.txt7
-rw-r--r--tests/SelfTest/Baselines/console.sw.multi.approved.txt7
-rw-r--r--tests/SelfTest/Baselines/tap.sw.approved.txt6
-rw-r--r--tests/SelfTest/Baselines/tap.sw.multi.approved.txt6
-rw-r--r--tests/SelfTest/Baselines/xml.sw.approved.txt7
-rw-r--r--tests/SelfTest/Baselines/xml.sw.multi.approved.txt7
-rw-r--r--tests/TestScripts/DiscoverTests/VerifyRegistration.py2
9 files changed, 25 insertions, 31 deletions
diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt
index 95809e24..94898c37 100644
--- a/tests/SelfTest/Baselines/compact.sw.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.approved.txt
@@ -1696,7 +1696,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fa
" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -1713,7 +1713,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fak
]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -1728,7 +1728,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fak
]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -1738,7 +1738,6 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fa
"tests": [
{
"name": "fake test name",
- "class-name": "",
"tags": [
"fakeTestTag"
],
diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
index 889ad483..2d268b2f 100644
--- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
@@ -1694,7 +1694,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fa
" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -1711,7 +1711,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fak
]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -1726,7 +1726,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fak
]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -1736,7 +1736,6 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fa
"tests": [
{
"name": "fake test name",
- "class-name": "",
"tags": [
"fakeTestTag"
],
diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt
index 1ae34284..9d8fa88f 100644
--- a/tests/SelfTest/Baselines/console.sw.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.approved.txt
@@ -11233,7 +11233,7 @@ Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -11273,7 +11273,7 @@ Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -11311,7 +11311,7 @@ Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -11321,7 +11321,6 @@ with expansion:
"tests": [
{
"name": "fake test name",
- "class-name": "",
"tags": [
"fakeTestTag"
],
diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
index 897f79ef..fcdf5f9f 100644
--- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
@@ -11231,7 +11231,7 @@ Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -11271,7 +11271,7 @@ Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -11309,7 +11309,7 @@ Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -11319,7 +11319,6 @@ with expansion:
"tests": [
{
"name": "fake test name",
- "class-name": "",
"tags": [
"fakeTestTag"
],
diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt
index 9a4826ed..657b86ff 100644
--- a/tests/SelfTest/Baselines/tap.sw.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.approved.txt
@@ -2767,15 +2767,15 @@ ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && Cont
# 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("fakeTag"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tags": [ { "aliases": [ "fakeTag" ], "count": 1 } ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON'
+ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "{ "version": 2, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tags": [ { "aliases": [ "fakeTag" ], "count": 1 } ]" contains: "fakeTag" 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
-ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "reporters": [ { "name": "fake reporter", "description": "fake description" } ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON'
+ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{ "version": 2, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "reporters": [ { "name": "fake reporter", "description": "fake description" } ]" contains: "fake reporter" 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
-ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tests": [ { "name": "fake test name", "class-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" ], "source-location": { "filename": "fake-file.cpp", "line": 123456789 } } ]" ( 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 cad770a2..5626093a 100644
--- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
@@ -2765,15 +2765,15 @@ ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && Cont
# 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("fakeTag"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tags": [ { "aliases": [ "fakeTag" ], "count": 1 } ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON'
+ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "{ "version": 2, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tags": [ { "aliases": [ "fakeTag" ], "count": 1 } ]" contains: "fakeTag" 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
-ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "reporters": [ { "name": "fake reporter", "description": "fake description" } ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON'
+ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{ "version": 2, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "reporters": [ { "name": "fake reporter", "description": "fake description" } ]" contains: "fake reporter" 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
-ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tests": [ { "name": "fake test name", "class-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" ], "source-location": { "filename": "fake-file.cpp", "line": 123456789 } } ]" ( 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 cf9dfdb2..42b41eca 100644
--- a/tests/SelfTest/Baselines/xml.sw.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.approved.txt
@@ -13419,7 +13419,7 @@ Approx( 0.98999999999999999 )
</Original>
<Expanded>
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -13456,7 +13456,7 @@ Approx( 0.98999999999999999 )
</Original>
<Expanded>
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -13491,7 +13491,7 @@ Approx( 0.98999999999999999 )
</Original>
<Expanded>
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -13501,7 +13501,6 @@ Approx( 0.98999999999999999 )
"tests": [
{
"name": "fake test name",
- "class-name": "",
"tags": [
"fakeTestTag"
],
diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
index 0ff255a2..3d265d40 100644
--- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
@@ -13419,7 +13419,7 @@ Approx( 0.98999999999999999 )
</Original>
<Expanded>
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -13456,7 +13456,7 @@ Approx( 0.98999999999999999 )
</Original>
<Expanded>
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -13491,7 +13491,7 @@ Approx( 0.98999999999999999 )
</Original>
<Expanded>
"{
- "version": 1,
+ "version": 2,
"metadata": {
"name": "",
"rng-seed": 1234,
@@ -13501,7 +13501,6 @@ Approx( 0.98999999999999999 )
"tests": [
{
"name": "fake test name",
- "class-name": "",
"tags": [
"fakeTestTag"
],
diff --git a/tests/TestScripts/DiscoverTests/VerifyRegistration.py b/tests/TestScripts/DiscoverTests/VerifyRegistration.py
index c281a403..2b85e969 100644
--- a/tests/TestScripts/DiscoverTests/VerifyRegistration.py
+++ b/tests/TestScripts/DiscoverTests/VerifyRegistration.py
@@ -87,7 +87,7 @@ def get_test_names(build_path: str) -> List[TestInfo]:
with open(fname, mode='r', encoding='utf-8') as file:
test_listing = json.load(file)
- assert test_listing['version'] == 1
+ assert test_listing['version'] == 2
tests = []
for test in test_listing['listings']['tests']: