@@ 150-162 (lines=13) @@ | ||
147 | self.assertRegex(output, '.*-D__WANDBOX__.*') |
|
148 | self.assertRegex(output, '.*-DTEST.*') |
|
149 | ||
150 | def test_boosttest_workarround(self): |
|
151 | if 'SCRUTINIZER' in os.environ: |
|
152 | self.skipTest('this test is not run on SCRUTINIZER.') |
|
153 | sys.argv[1:] = [test_src] |
|
154 | sys.argv.extend(test_opt_nomain) |
|
155 | sys.argv.extend(['--boost', '1.65.0']) |
|
156 | print(sys.argv) |
|
157 | with self.assertRaises(SystemExit) as cm: |
|
158 | iuwandbox.main() |
|
159 | output = self.dump() |
|
160 | self.assertEqual(cm.exception.code, 1, output) |
|
161 | self.assertRegex(output, '.*hint:.*') |
|
162 | self.assertRegex(output, '.*If you do not use boost test, please specify the file with the main function first..*') |
|
163 | ||
164 | def test_run(self): |
|
165 | if 'SCRUTINIZER' in os.environ: |
|
@@ 121-132 (lines=12) @@ | ||
118 | self.assertRegex(output, '.*hint:.*') |
|
119 | self.assertRegex(output, '.*In "iutest" you can omit the definition of the main function, please define IUTEST_USE_MAIN. (--iutest-use-main or -f"-DIUTEST_USE_MAIN")*') |
|
120 | ||
121 | def test_use_main(self): |
|
122 | if 'SCRUTINIZER' in os.environ: |
|
123 | self.skipTest('this test is not run on SCRUTINIZER.') |
|
124 | sys.argv[1:] = [test_src] |
|
125 | sys.argv.extend(test_opt_nomain) |
|
126 | sys.argv.append('--iutest-use-main') |
|
127 | print(sys.argv) |
|
128 | with self.assertRaises(SystemExit) as cm: |
|
129 | iuwandbox.main() |
|
130 | output = self.dump() |
|
131 | self.assertEqual(cm.exception.code, 0, output) |
|
132 | self.assertRegex(output, '.*OK.*') |
|
133 | ||
134 | def test_define_wandbox(self): |
|
135 | if 'SCRUTINIZER' in os.environ: |
|
@@ 108-119 (lines=12) @@ | ||
105 | self.skipTest('fused-src (wandbox) is not exists') |
|
106 | return super(iuwandbox_test, self).setUp() |
|
107 | ||
108 | def test_nomain(self): |
|
109 | if 'SCRUTINIZER' in os.environ: |
|
110 | self.skipTest('this test is not run on SCRUTINIZER.') |
|
111 | sys.argv[1:] = [test_src] |
|
112 | sys.argv.extend(test_opt_nomain) |
|
113 | print(sys.argv) |
|
114 | with self.assertRaises(SystemExit) as cm: |
|
115 | iuwandbox.main() |
|
116 | output = self.dump() |
|
117 | self.assertEqual(cm.exception.code, 1, output) |
|
118 | self.assertRegex(output, '.*hint:.*') |
|
119 | self.assertRegex(output, '.*In "iutest" you can omit the definition of the main function, please define IUTEST_USE_MAIN. (--iutest-use-main or -f"-DIUTEST_USE_MAIN")*') |
|
120 | ||
121 | def test_use_main(self): |
|
122 | if 'SCRUTINIZER' in os.environ: |