diff options
| author | Yong He <yonghe@outlook.com> | 2022-09-20 15:44:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-20 15:44:16 -0700 |
| commit | a95fe92dafbd2a2e718bb4aac090a7156a46e79b (patch) | |
| tree | e6498b703fee843921e32da005fb00be85e23eec /tests/cpu-program/gfx-smoke.slang | |
| parent | e60a6fd40cbc0f0d8548f0160bb92437e3d79509 (diff) | |
Use `printf` in tests. (#2406)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/cpu-program/gfx-smoke.slang')
| -rw-r--r-- | tests/cpu-program/gfx-smoke.slang | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/cpu-program/gfx-smoke.slang b/tests/cpu-program/gfx-smoke.slang index 37beede7e..d0acb83db 100644 --- a/tests/cpu-program/gfx-smoke.slang +++ b/tests/cpu-program/gfx-smoke.slang @@ -1,7 +1,4 @@ //TEST:EXECUTABLE: -__target_intrinsic(cpp, "printf(\"%s\\n\", ($0).getBuffer())") -void writeln(String text); - import gfx; import slang; @@ -13,7 +10,7 @@ public __extern_cpp int main() gfx.gfxCreateDevice(&deviceDesc, device); if (device == none) { - writeln("fail"); + printf("fail\n"); return -1; } @@ -98,7 +95,7 @@ public __extern_cpp int main() for (int i = 0; i < 4; i++) { float val = ((float *)blob.value.getBufferPointer())[i]; - writeln(String(val)); + printf("%.1f\n", val); } return 0; }
\ No newline at end of file |
