Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: third_party/lit/tests/Inputs/googletest-format/DummySubDir/OneTest

Issue 1663053003: [fusl] Add llvm's lit tool to third_party (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: move down a dir Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 import sys
4
5 if len(sys.argv) != 2:
6 raise ValueError("unexpected number of args")
7
8 if sys.argv[1] == "--gtest_list_tests":
9 print("""\
10 FirstTest.
11 subTestA
12 subTestB
13 ParameterizedTest/0.
14 subTest
15 ParameterizedTest/1.
16 subTest""")
17 sys.exit(0)
18 elif not sys.argv[1].startswith("--gtest_filter="):
19 raise ValueError("unexpected argument: %r" % (sys.argv[1]))
20
21 test_name = sys.argv[1].split('=',1)[1]
22 if test_name == 'FirstTest.subTestA':
23 print('I am subTest A, I PASS')
24 print('[ PASSED ] 1 test.')
25 sys.exit(0)
26 elif test_name == 'FirstTest.subTestB':
27 print('I am subTest B, I FAIL')
28 print('And I have two lines of output')
29 sys.exit(1)
30 elif test_name in ('ParameterizedTest/0.subTest',
31 'ParameterizedTest/1.subTest'):
32 print('I am a parameterized test, I also PASS')
33 print('[ PASSED ] 1 test.')
34 sys.exit(0)
35 else:
36 raise SystemExit("error: invalid test name: %r" % (test_name,))
OLDNEW
« no previous file with comments | « third_party/lit/tests/Inputs/exec-discovery/lit.site.cfg ('k') | third_party/lit/tests/Inputs/googletest-format/lit.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698