aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrun_unittests.py13
-rw-r--r--test cases/unit/45 vscpp17/main.cpp (renamed from test cases/windows/17 cpp17/main.cpp)0
-rw-r--r--test cases/unit/45 vscpp17/meson.build4
-rw-r--r--test cases/windows/17 cpp17/meson.build9
4 files changed, 17 insertions, 9 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 9e9ba04..ee80a87 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3097,6 +3097,19 @@ class WindowsTests(BasePlatformTests):
self.utime(os.path.join(testdir, 'res', 'resource.h'))
self.assertRebuiltTarget('prog_1')
+ @unittest.skipIf(shutil.which('cl') is None, 'Test only applies to VS')
+ def test_msvc_cpp17(self):
+ testdir = os.path.join(self.unit_test_dir, '45 vscpp17')
+ try:
+ self.init(testdir)
+ except subprocess.CalledProcessError:
+ # According to Python docs, output is only stored when
+ # using check_output. We don't use it, so we can't check
+ # that the output is correct (i.e. that it failed due
+ # to the right reason).
+ return
+ self.build()
+
class DarwinTests(BasePlatformTests):
'''
Tests that should run on macOS
diff --git a/test cases/windows/17 cpp17/main.cpp b/test cases/unit/45 vscpp17/main.cpp
index 36e4156..36e4156 100644
--- a/test cases/windows/17 cpp17/main.cpp
+++ b/test cases/unit/45 vscpp17/main.cpp
diff --git a/test cases/unit/45 vscpp17/meson.build b/test cases/unit/45 vscpp17/meson.build
new file mode 100644
index 0000000..afe740b
--- /dev/null
+++ b/test cases/unit/45 vscpp17/meson.build
@@ -0,0 +1,4 @@
+project('msvc_cpp17', 'cpp', default_options: ['cpp_std=c++17'])
+
+exe = executable('msvc_cpp17', 'main.cpp')
+test('msvc_cpp17', exe)
diff --git a/test cases/windows/17 cpp17/meson.build b/test cases/windows/17 cpp17/meson.build
deleted file mode 100644
index 367bfd8..0000000
--- a/test cases/windows/17 cpp17/meson.build
+++ /dev/null
@@ -1,9 +0,0 @@
-project('msvc_cpp17', 'cpp', default_options: ['cpp_std=c++17'])
-
-compiler = meson.get_compiler('cpp')
-if compiler.get_id() != 'msvc' or compiler.version().version_compare('<19.11')
- error('MESON_SKIP_TEST Visual Studio 2017 (version 15.3) or later is required for C++17 support')
-endif
-
-exe = executable('msvc_cpp17', 'main.cpp')
-test('msvc_cpp17', exe)