From e3366281eed794c33d26c8072d86f052f5f6b086 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 6 May 2020 23:50:20 +0300 Subject: [PATCH] tests: skip sqlite_test.v on musl too, fix compilation of path_tracing.v --- cmd/tools/vtest-fixed.v | 1 + examples/path_tracing.v | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/tools/vtest-fixed.v b/cmd/tools/vtest-fixed.v index 0acb9e7d45..f974bde42c 100644 --- a/cmd/tools/vtest-fixed.v +++ b/cmd/tools/vtest-fixed.v @@ -17,6 +17,7 @@ const ( skip_on_musl = [ 'vlib/net/http/http_test.v', 'vlib/net/http/cookie_test.v', + 'vlib/sqlite/sqlite_test.v', 'vlib/clipboard/clipboard_test.v', ] skip_on_linux = []string{} diff --git a/examples/path_tracing.v b/examples/path_tracing.v index ff43249e2f..836bc217e2 100644 --- a/examples/path_tracing.v +++ b/examples/path_tracing.v @@ -417,7 +417,7 @@ fn ray_trace(w int, h int, samps int, file_name string, scene_id int) Image { for sy := 0; sy < 2; sy ++ { for sx := 0; sx < 2; sx ++ { r = Vec{0,0,0} - for s in 0..samps { + for _ in 0..samps { r1 := v_2 * rand_f64() dx := if r1 < v_1 { math.sqrt(r1) - v_1 } else { v_1 - math.sqrt(v_2 - r1) } @@ -473,10 +473,11 @@ fn main() { image := ray_trace(width, height, samples, file_name, scene_id) t2:=time.ticks() - eprintln('\nRendering finished. Took: ${t2-t1:5d}ms') + + eprintln('\nRendering finished. Took: ${(t2-t1):5}ms') image.save_as_ppm( file_name ) t3:=time.ticks() - eprintln('Image saved as [${file_name}]. Took: ${t3-t2:5d}ms') + eprintln('Image saved as [${file_name}]. Took: ${(t3-t2):5}ms') }