diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-09-25 10:27:45 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-09-26 20:54:06 +0300 |
commit | 4eb13f6afde4a382625e1e7bbeca5d7bd2cec624 (patch) | |
tree | 1fc2ab1cc8d87c2ffd40244bda31521ceffa750e | |
parent | 13e91ab4996ffd3e3ebc24e7a69ccba64e89b4f5 (diff) | |
download | meson-4eb13f6afde4a382625e1e7bbeca5d7bd2cec624.zip meson-4eb13f6afde4a382625e1e7bbeca5d7bd2cec624.tar.gz meson-4eb13f6afde4a382625e1e7bbeca5d7bd2cec624.tar.bz2 |
tests/94 default options: Also test warning_level
Can't really test that it's actually getting applied, but we can test
that it's being set
-rw-r--r-- | test cases/common/94 default options/meson.build | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test cases/common/94 default options/meson.build b/test cases/common/94 default options/meson.build index 6299106..a718bcc 100644 --- a/test cases/common/94 default options/meson.build +++ b/test cases/common/94 default options/meson.build @@ -2,6 +2,7 @@ project('default options', 'cpp', 'c', default_options : [ 'buildtype=debugoptimized', 'cpp_std=c++03', 'cpp_eh=none', + 'warning_level=3', ]) cpp = meson.get_compiler('cpp') @@ -9,11 +10,16 @@ cpp = meson.get_compiler('cpp') assert(get_option('buildtype') == 'debugoptimized', 'Build type default value wrong.') if cpp.get_id() == 'msvc' - assert(get_option('cpp_eh') == 'none', 'MSVC eh value wrong.') + cpp_eh = get_option('cpp_eh') + assert(cpp_eh == 'none', 'MSVC eh value is "' + cpp_eh + '" instead of "none"') else - assert(get_option('cpp_std') == 'c++03', 'C++ std value wrong.') + cpp_std = get_option('cpp_std') + assert(cpp_std == 'c++03', 'C++ std value is "' + cpp_std + '" instead of c++03.') endif +w_level = get_option('warning_level') +assert(w_level == '3', 'warning level "' + w_level + '" instead of "3"') + # FIXME. Since we no longer accept invalid options to c_std etc, # there is no simple way to test this. Gcc does not seem to expose # the C std used in a preprocessor token so we can't check for it. |