Unit test for Google Test's JSON output functionality.
Definition at line 462 of file googletest-json-output-unittest.py.
◆ _GetJsonOutput()
def googletest-json-output-unittest.GTestJsonOutputUnitTest._GetJsonOutput |
( |
|
self, |
|
|
|
gtest_prog_name, |
|
|
|
extra_args, |
|
|
|
expected_exit_code |
|
) |
| |
|
private |
Returns the JSON output generated by running the program gtest_prog_name.
Furthermore, the program's exit code must be expected_exit_code.
Args:
gtest_prog_name: Google Test binary name.
extra_args: extra arguments to binary invocation.
expected_exit_code: program's exit code.
Definition at line 575 of file googletest-json-output-unittest.py.
◆ _TestJsonOutput()
def googletest-json-output-unittest.GTestJsonOutputUnitTest._TestJsonOutput |
( |
|
self, |
|
|
|
gtest_prog_name, |
|
|
|
expected, |
|
|
|
expected_exit_code, |
|
|
|
extra_args = None |
|
) |
| |
|
private |
Checks the JSON output generated by the Google Test binary.
Asserts that the JSON document generated by running the program
gtest_prog_name matches expected_json, a string containing another
JSON document. Furthermore, the program's exit code must be
expected_exit_code.
Args:
gtest_prog_name: Google Test binary name.
expected: expected output.
expected_exit_code: program's exit code.
extra_args: extra arguments to binary invocation.
Definition at line 607 of file googletest-json-output-unittest.py.
◆ testDefaultOutputFile()
def googletest-json-output-unittest.GTestJsonOutputUnitTest.testDefaultOutputFile |
( |
|
self | ) |
|
Verifies the default output file name.
Confirms that Google Test produces an JSON output file with the expected
default name if no name is explicitly specified.
Definition at line 511 of file googletest-json-output-unittest.py.
◆ testEmptyJsonOutput()
def googletest-json-output-unittest.GTestJsonOutputUnitTest.testEmptyJsonOutput |
( |
|
self | ) |
|
Verifies JSON output for a Google Test binary without actual tests.
Runs a test program that generates an empty JSON output, and
tests that the JSON output is expected.
Definition at line 478 of file googletest-json-output-unittest.py.
◆ testFilteredTestJsonOutput()
def googletest-json-output-unittest.GTestJsonOutputUnitTest.testFilteredTestJsonOutput |
( |
|
self | ) |
|
Verifies JSON output when a filter is applied.
Runs a test program that executes only some tests and verifies that
non-selected tests do not show up in the JSON output.
Definition at line 565 of file googletest-json-output-unittest.py.
◆ testNonEmptyJsonOutput()
def googletest-json-output-unittest.GTestJsonOutputUnitTest.testNonEmptyJsonOutput |
( |
|
self | ) |
|
Verifies JSON output for a Google Test binary with non-empty output.
Runs a test program that generates a non-empty JSON output, and
tests that the JSON output is expected.
Definition at line 470 of file googletest-json-output-unittest.py.
◆ testSuppressedJsonOutput()
def googletest-json-output-unittest.GTestJsonOutputUnitTest.testSuppressedJsonOutput |
( |
|
self | ) |
|
Verifies that no JSON output is generated.
Tests that no JSON file is generated if the default JSON listener is
shut down before RUN_ALL_TESTS is invoked.
Definition at line 535 of file googletest-json-output-unittest.py.
◆ testTimestampValue()
def googletest-json-output-unittest.GTestJsonOutputUnitTest.testTimestampValue |
( |
|
self | ) |
|
Checks whether the timestamp attribute in the JSON output is valid.
Runs a test program that generates an empty JSON output, and checks if
the timestamp attribute in the testsuites tag is valid.
Definition at line 487 of file googletest-json-output-unittest.py.
The documentation for this class was generated from the following file: