aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-11-09 08:21:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-11-09 08:21:42 +0200
commitf1b4ffa568c91302057da14e611368dcf9244953 (patch)
tree400880e1a34579d43f77980a10c41b4916897703 /tests
parent2fc58b7bda7f8da672c7bd165f441eef6b260dcf (diff)
Enable named modules tests for Clang 16 or later (but not on Windows)
Diffstat (limited to 'tests')
-rw-r--r--tests/cc/modules/common.testscript9
-rw-r--r--tests/cc/modules/modules.testscript4
2 files changed, 7 insertions, 6 deletions
diff --git a/tests/cc/modules/common.testscript b/tests/cc/modules/common.testscript
index 50dc865..2aa19d1 100644
--- a/tests/cc/modules/common.testscript
+++ b/tests/cc/modules/common.testscript
@@ -21,7 +21,8 @@ cxx.std = experimental
cxx.features.symexport = true
# @@ TMP revise
-if ($cxx.id == 'gcc')
+if ($cxx.id == 'gcc' || \
+ ($cxx.id.type == 'clang' && $cxx.version.major >= 16))
cxx.features.modules = true
using cxx
@@ -38,7 +39,7 @@ if ($cxx.target.class == 'windows')
exe{*}: test = true
EOI
-# Determine if we have modules and header units support.
+# Determine if we have named modules and header units support.
#
+$* noop <<EOI | set modules
print $cxx.features.modules
@@ -49,8 +50,10 @@ print ($cxx.features.modules && $cxx.id == 'gcc')
EOI
# @@ TMP: modules support is broken in MinGW GCC (not just symexport).
+# @@ TMP: try modules with Clang on Windows (symexport is likely broken).
#
-if ($cxx.target.class == 'windows' && $cxx.id == 'gcc')
+if ($cxx.target.class == 'windows' && \
+ ($cxx.id == 'gcc' || $cxx.id.type == 'clang'))
modules = false
headers = false
end
diff --git a/tests/cc/modules/modules.testscript b/tests/cc/modules/modules.testscript
index 8762885..7e860fd 100644
--- a/tests/cc/modules/modules.testscript
+++ b/tests/cc/modules/modules.testscript
@@ -205,15 +205,13 @@ $* test clean <<EOI
:
: Test global module fragment/leading module marker (module;).
:
-if ($cxx.id != 'msvc') # Disabled for MSVC due to issue 845845.
+if ($cxx.id != 'msvc') # Disabled for MSVC due to issue 845845. @@ TMP revise
{
cat <<EOI >=g.hxx;
void g ();
EOI
cat <<EOI >=core.mxx;
-#if __cpp_modules >= 201810
module;
-#endif
#include "g.hxx"
EOI