diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-03-21 21:26:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-21 21:26:16 +0200 |
commit | 12bac512f6497e46ada8ed980cbcb1631506691c (patch) | |
tree | 1dfac37976c17672df41f83f3bf6562f2f92e25f /run_unittests.py | |
parent | 30827b5644b00aa01c14a116a0c8fec72e63592e (diff) | |
parent | 6910f604ed60ffc5da37b86c4ab6d3f2da618c60 (diff) | |
download | meson-12bac512f6497e46ada8ed980cbcb1631506691c.zip meson-12bac512f6497e46ada8ed980cbcb1631506691c.tar.gz meson-12bac512f6497e46ada8ed980cbcb1631506691c.tar.bz2 |
Fix b_ndebug=if-release silently not working
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index b6367c1..94e39c8 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1895,6 +1895,20 @@ int main(int argc, char **argv) { exception_raised = True self.assertTrue(exception_raised, 'Double locking did not raise exception.') + def test_ndebug_if_release_disabled(self): + testdir = os.path.join(self.unit_test_dir, '25 ndebug if-release') + self.init(testdir, extra_args=['--buildtype=release', '-Db_ndebug=if-release']) + self.build() + exe = os.path.join(self.builddir, 'main') + self.assertEqual(b'NDEBUG=1', subprocess.check_output(exe).strip()) + + def test_ndebug_if_release_enabled(self): + testdir = os.path.join(self.unit_test_dir, '25 ndebug if-release') + self.init(testdir, extra_args=['--buildtype=debugoptimized', '-Db_ndebug=if-release']) + self.build() + exe = os.path.join(self.builddir, 'main') + self.assertEqual(b'NDEBUG=0', subprocess.check_output(exe).strip()) + class FailureTests(BasePlatformTests): ''' |