forked from catchorg/Catch2
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).
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user