6 raise ValueError("unexpected number of args")
8 if sys
.argv
[1] == "--gtest_list_tests":
10 Running main() from gtest_main.cc
19 elif not sys
.argv
[1].startswith("--gtest_filter="):
20 raise ValueError("unexpected argument: %r" % (sys
.argv
[1]))
22 test_name
= sys
.argv
[1].split('=',1)[1]
23 print('Running main() from gtest_main.cc')
24 if test_name
== 'FirstTest.subTestA':
25 print('I am subTest A, I PASS')
26 print('[ PASSED ] 1 test.')
28 elif test_name
== 'FirstTest.subTestB':
29 print('I am subTest B, I FAIL')
30 print('And I have two lines of output')
32 elif test_name
in ('ParameterizedTest/0.subTest',
33 'ParameterizedTest/1.subTest'):
34 print('I am a parameterized test, I also PASS')
35 print('[ PASSED ] 1 test.')
38 raise SystemExit("error: invalid test name: %r" % (test_name
,))