Skip to content

Commit eab339c

Browse files
committed
Attempt to rewrite tests for -fmodule* args to clang-cl
1 parent 09d7caa commit eab339c

File tree

1 file changed

+6
-63
lines changed

1 file changed

+6
-63
lines changed
Lines changed: 6 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,8 @@
1-
// REQUIRES: system-windows
1+
// RUN: %clang_cl /std:c++20 --precompile -### -- %s 2>&1 | FileCheck %s
2+
// CHECK: --precompile
23

3-
// RUN: rm -rf %t
4-
// RUN: mkdir -p %t
5-
// RUN: split-file %s %t
6-
7-
// RUN: %clang_cl /std:c++20 --precompile "%/t/Hello.cppm" "/Fo%/t/Hello.pcm"
8-
// RUN: %clang_cl /std:c++20 %/t/use.cpp -fmodule-file=Hello=%/t/Hello.pcm %/t/Hello.pcm /Fo%/t/SimpleHelloWorld.exe 2>&1
9-
10-
// RUN: %/t/SimpleHelloWorld.exe
11-
// CHECK: Simple Hello World!
12-
13-
//--- Hello.cppm
14-
module;
15-
#include <iostream>
16-
export module Hello;
17-
export void hello() {
18-
std::cout << "Simple Hello World!\n";
19-
}
20-
21-
//--- use.cpp
22-
import Hello;
23-
int main() {
24-
hello();
25-
return 0;
26-
}
27-
28-
//--- M.cppm
29-
export module M;
30-
export import :interface_part;
31-
import :impl_part;
32-
export void Hello();
33-
34-
//--- interface_part.cpp
35-
export module M:interface_part;
36-
export void World();
37-
38-
//--- impl_part.cppm
39-
module;
40-
#include <iostream>
41-
#include <string>
42-
module M:impl_part;
43-
import :interface_part;
44-
45-
std::string W = "World!";
46-
void World() {
47-
std::cout << W << std::endl;
48-
}
49-
50-
//--- Impl.cpp
51-
module;
52-
#include <iostream>
53-
module M;
54-
void Hello() {
55-
std::cout << "Complex Hello ";
56-
}
57-
58-
//--- User.cpp
59-
import M;
60-
int main() {
61-
Hello();
62-
World();
63-
return 0;
64-
}
4+
// RUN: %clang_cl /std:c++20 --fmodule-file=Foo=Foo.pcm -### -- %s 2>&1 | FileCheck %s
5+
// CHECK: -fmodule-file=Foo=Foo.pcm
656

7+
// RUN: %clang_cl /std:c++20 --fprebuilt-module-path=. -### -- %s 2>&1 | FileCheck %s
8+
// CHECK: -fprebuilt-module-path=.

0 commit comments

Comments
 (0)