From 7955181c6c2669143b7cdce6d4969e29fe613baf Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 26 Apr 2020 09:18:29 +0200 Subject: [PATCH] tests: [] fixes --- vlib/v/checker/tests/inout/left_shift_err.vv | 2 +- vlib/v/fmt/fmt_keep_test.v | 2 +- vlib/v/fmt/tests/type_ptr_keep.vv | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vlib/v/checker/tests/inout/left_shift_err.vv b/vlib/v/checker/tests/inout/left_shift_err.vv index 59a6652e24..df62f079be 100644 --- a/vlib/v/checker/tests/inout/left_shift_err.vv +++ b/vlib/v/checker/tests/inout/left_shift_err.vv @@ -1,4 +1,4 @@ fn main() { - l := []int + l := []int{} l << 'test' } diff --git a/vlib/v/fmt/fmt_keep_test.v b/vlib/v/fmt/fmt_keep_test.v index 9dd83136d1..9da65183ad 100644 --- a/vlib/v/fmt/fmt_keep_test.v +++ b/vlib/v/fmt/fmt_keep_test.v @@ -28,7 +28,7 @@ fn test_fmt() { mut fmt_bench := benchmark.new_benchmark() keep_input_files := os.walk_ext('$vroot/vlib/v/fmt/tests', '_keep.vv') expected_input_files := os.walk_ext('$vroot/vlib/v/fmt/tests', '_expected.vv') - mut input_files := []string + mut input_files := []string{} input_files << keep_input_files input_files << expected_input_files fmt_bench.set_total_expected_steps(input_files.len) diff --git a/vlib/v/fmt/tests/type_ptr_keep.vv b/vlib/v/fmt/tests/type_ptr_keep.vv index 5a11bf9e40..88ec016566 100644 --- a/vlib/v/fmt/tests/type_ptr_keep.vv +++ b/vlib/v/fmt/tests/type_ptr_keep.vv @@ -1,13 +1,13 @@ const ( x = &Test{} - y = []&Test - z = &[]&Test + y = []&Test{} + z = &[]&Test{} ) fn test_type_ptr() { _ := &Test{} - _ := []&Test - _ := &[]&Test + _ := []&Test{} + _ := &[]&Test{} } struct Test {