[InstCombine] Signed saturation patterns
[llvm-core.git] / utils / lit / tests / Inputs / googletest-upstream-format / DummySubDir / OneTest.py
blobd7bc5968f26117c7be18ca2f5b97e117f4ac4fc4
1 #!/usr/bin/env python
3 import sys
5 if len(sys.argv) != 2:
6 raise ValueError("unexpected number of args")
8 if sys.argv[1] == "--gtest_list_tests":
9 print("""\
10 Running main() from gtest_main.cc
11 FirstTest.
12 subTestA
13 subTestB
14 ParameterizedTest/0.
15 subTest
16 ParameterizedTest/1.
17 subTest""")
18 sys.exit(0)
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.')
27 sys.exit(0)
28 elif test_name == 'FirstTest.subTestB':
29 print('I am subTest B, I FAIL')
30 print('And I have two lines of output')
31 sys.exit(1)
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.')
36 sys.exit(0)
37 else:
38 raise SystemExit("error: invalid test name: %r" % (test_name,))