Tests/CXXModules: import from an internal partition

It is reported that MSVC doesn't support the `modname=` syntax in its
`-reference modname=modname.ifc` for internal partitions. Add a test
case.
This commit is contained in:
Ben Boeckel
2023-12-05 08:02:51 -05:00
parent b9970be9bc
commit 8a658fb9ec
3 changed files with 10 additions and 2 deletions

View File

@@ -19,7 +19,8 @@ target_sources(internal-partitions
"${CMAKE_CURRENT_SOURCE_DIR}"
FILES
importable.cxx
partition.cxx)
partition.cxx
internal.cxx)
target_compile_features(internal-partitions PUBLIC cxx_std_20)
add_executable(exe)

View File

@@ -0,0 +1,6 @@
export module internal;
export int from_internal()
{
return 0;
}

View File

@@ -1,6 +1,7 @@
module importable:internal_partition;
import internal;
int from_partition()
{
return 0;
return from_internal();
}