diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2024-09-12 09:12:44 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-01-27 09:38:53 -0800 |
| commit | 18331db7c1b32e6a8771f0f058c1dd8fce52a1b7 (patch) | |
| tree | 63d4d0d499fc639c8ba818b5dbb47c3975644a9d /unittests | |
| parent | 19b67fbf29faa3d4a90e05722501be128f6ddbd0 (diff) | |
| download | meson-18331db7c1b32e6a8771f0f058c1dd8fce52a1b7.tar.gz | |
unit tests: make the test_c_cpp_stds test more robust
Check clang-cl as well as cl, and clang as well as gcc.
Diffstat (limited to 'unittests')
| -rw-r--r-- | unittests/allplatformstests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 96576b0ee..d5c126e50 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -5055,7 +5055,7 @@ class AllPlatformTests(BasePlatformTests): self.setconf('-Dc_std=c++11') env = get_fake_env() cc = detect_c_compiler(env, MachineChoice.HOST) - if cc.get_id() == 'msvc': + if cc.get_id() in {'msvc', 'clang-cl'}: # default_option should have selected those self.assertEqual(self.getconf('c_std'), 'c89') self.assertEqual(self.getconf('cpp_std'), 'vc++11') @@ -5068,7 +5068,7 @@ class AllPlatformTests(BasePlatformTests): # The first supported std should be selected self.setconf('-Dcpp_std=gnu++11,vc++11,c++11') self.assertEqual(self.getconf('cpp_std'), 'vc++11') - elif cc.get_id() == 'gcc': + elif cc.get_id() == 'gcc' or (cc.get_id() == 'clang' and not is_windows()): # default_option should have selected those self.assertEqual(self.getconf('c_std'), 'gnu89') self.assertEqual(self.getconf('cpp_std'), 'gnu++98') |
