From bdfa86bccebb1bed6f3c7cec97db58d69ec44572 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 28 Dec 2025 20:31:13 +0800 Subject: fix xmake test for std modules --- tests/projects/c++/modules/xmake_tests4/src/main.cpp | 5 +++++ tests/projects/c++/modules/xmake_tests4/src/work.mpp | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/projects/c++/modules/xmake_tests4/src/main.cpp create mode 100644 tests/projects/c++/modules/xmake_tests4/src/work.mpp (limited to 'tests/projects/c++/modules/xmake_tests4/src') diff --git a/tests/projects/c++/modules/xmake_tests4/src/main.cpp b/tests/projects/c++/modules/xmake_tests4/src/main.cpp new file mode 100644 index 000000000..45222c241 --- /dev/null +++ b/tests/projects/c++/modules/xmake_tests4/src/main.cpp @@ -0,0 +1,5 @@ +import work; + +int main() { + do_work(); +} diff --git a/tests/projects/c++/modules/xmake_tests4/src/work.mpp b/tests/projects/c++/modules/xmake_tests4/src/work.mpp new file mode 100644 index 000000000..27b5f2089 --- /dev/null +++ b/tests/projects/c++/modules/xmake_tests4/src/work.mpp @@ -0,0 +1,14 @@ +export module work; +import std; + +export +template +void do_work() { + if constexpr (std::is_same_v) { + std::println("Hello world!"); + } else if constexpr (std::is_same_v) { + std::println("Hello test!"); + } else { + std::println("Hello unknown type!"); + } +} -- cgit v1.3.1