diff options
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 66f8205..4d38b61 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1262,6 +1262,25 @@ class LinuxlikeTests(BasePlatformTests): self.assertEqual(0, statf.st_uid) + def test_cpp_std_override(self): + testdir = os.path.join(self.unit_test_dir, '6 std override') + self.init(testdir) + compdb = self.get_compdb() + for i in compdb: + if 'prog03' in i['file']: + c03_comp = i['command'] + if 'prog11' in i['file']: + c11_comp = i['command'] + if 'progp' in i['file']: + plain_comp = i['command'] + self.assertNotEqual(len(plain_comp), 0) + self.assertIn('-std=c++03', c03_comp) + self.assertNotIn('-std=c++11', c03_comp) + self.assertIn('-std=c++11', c11_comp) + self.assertNotIn('-std=c++03', c11_comp) + self.assertNotIn('-std=c++03', plain_comp) + self.assertNotIn('-std=c++11', plain_comp) + class RewriterTests(unittest.TestCase): def setUp(self): |