Add test for werror which is a boolean type.

pull/1457/head
Jussi Pakkanen 8 years ago
parent 553ac89e02
commit 1b81b32afb
  1. 4
      run_unittests.py
  2. 2
      test cases/common/139 override options/meson.build
  3. 6
      test cases/unit/6 std override/meson.build

@ -1261,7 +1261,6 @@ class LinuxlikeTests(BasePlatformTests):
# The chown failed nonfatally if we're not root
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)
@ -1280,6 +1279,9 @@ class LinuxlikeTests(BasePlatformTests):
self.assertNotIn('-std=c++03', c11_comp)
self.assertNotIn('-std=c++03', plain_comp)
self.assertNotIn('-std=c++11', plain_comp)
# Now werror
self.assertIn('-Werror', plain_comp)
self.assertNotIn('-Werror', c03_comp)
class RewriterTests(unittest.TestCase):

@ -4,3 +4,5 @@ project('option override', 'c',
executable('mustunity', 'one.c', 'two.c')
executable('notunity', 'three.c', 'four.c',
override_options : ['unity=false'])

@ -1,8 +1,10 @@
project('cpp std override', 'cpp',
default_options : 'cpp_std=c++03')
default_options : ['cpp_std=c++03',
'werror=true'])
executable('plain', 'progp.cpp',
override_options : 'cpp_std=none')
executable('v03', 'prog03.cpp')
executable('v03', 'prog03.cpp',
override_options : 'werror=false')
executable('v11', 'prog11.cpp',
override_options : 'cpp_std=c++11')

Loading…
Cancel
Save