From a95fe92dafbd2a2e718bb4aac090a7156a46e79b Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 20 Sep 2022 15:44:16 -0700 Subject: Use `printf` in tests. (#2406) Co-authored-by: Yong He --- tests/cpu-program/gfx-smoke.slang | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/cpu-program/gfx-smoke.slang') 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 -- cgit v1.2.3