diff options
| author | Yong He <yonghe@outlook.com> | 2022-06-21 09:25:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-21 09:25:51 -0700 |
| commit | 92dfec2320421113498ae7b5b72e78bd8b5b09a8 (patch) | |
| tree | 94abc8d02468c50112841a86ee2843024d22d51b /tests/cpu-program | |
| parent | d2a467c7a941c4453b3d825c9d5bb4d72230c8ba (diff) | |
Add CPU executable compile test (#2278)
* Add cpu executable compile test
* Fix.
* Fix permission on linux
* retrigger build
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/cpu-program')
| -rw-r--r-- | tests/cpu-program/cpu-hello-world.slang | 9 | ||||
| -rw-r--r-- | tests/cpu-program/cpu-hello-world.slang.expected | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/cpu-program/cpu-hello-world.slang b/tests/cpu-program/cpu-hello-world.slang new file mode 100644 index 000000000..9385b239c --- /dev/null +++ b/tests/cpu-program/cpu-hello-world.slang @@ -0,0 +1,9 @@ +//TEST:EXECUTABLE: +__target_intrinsic(cpp, "printf(\"%s\\n\", ($0).getBuffer())") +void writeln(String text); + +public __extern_cpp int main() +{ + writeln("Hello World."); + return 0; +}
\ No newline at end of file diff --git a/tests/cpu-program/cpu-hello-world.slang.expected b/tests/cpu-program/cpu-hello-world.slang.expected new file mode 100644 index 000000000..81531657f --- /dev/null +++ b/tests/cpu-program/cpu-hello-world.slang.expected @@ -0,0 +1,6 @@ +result code = 0 +standard error = { +} +standard output = { +Hello World. +} |
