diff --git a/vlib/v/fmt/tests/array_slices_expected.vv b/vlib/v/fmt/tests/array_slices_expected.vv new file mode 100644 index 0000000000..243806de8a --- /dev/null +++ b/vlib/v/fmt/tests/array_slices_expected.vv @@ -0,0 +1,11 @@ +[inline] +fn fn_contains_index_expr() { + arr := [1, 2, 3, 4, 5] + a := 1 in arr[0..] + b := 1 in arr[..2] + c := 1 in arr[1..3] + d := arr[2] + e := arr[2..] + f := arr[..2] + g := arr[1..3] +} diff --git a/vlib/v/fmt/tests/array_slices_input.vv b/vlib/v/fmt/tests/array_slices_input.vv new file mode 100644 index 0000000000..f773accf84 --- /dev/null +++ b/vlib/v/fmt/tests/array_slices_input.vv @@ -0,0 +1,12 @@ + + +[inline] fn fn_contains_index_expr() { + arr := [1, 2, 3, 4, 5] + a := 1 in arr[ 0.. ] + b := 1 in arr[ ..2 ] + c := 1 in arr[1..3] + d := arr[2] + e := arr[2 ..] + f := arr[.. 2 ] + g := arr[ 1 .. 3] +} diff --git a/vlib/v/fmt/tests/simple_expected.vv b/vlib/v/fmt/tests/simple_expected.vv index 848cd425f7..bda6776364 100644 --- a/vlib/v/fmt/tests/simple_expected.vv +++ b/vlib/v/fmt/tests/simple_expected.vv @@ -58,18 +58,6 @@ fn new_user() User { } } -[inline] -fn fn_contains_index_expr() { - arr := [1, 2, 3, 4, 5] - a := 1 in arr[0..] - b := 1 in arr[..2] - c := 1 in arr[1..3] - d := arr[2] - e := arr[2..] - f := arr[..2] - g := arr[1..3] -} - fn voidfn() { println('this is a function that does not return anything') } diff --git a/vlib/v/fmt/tests/simple_input.vv b/vlib/v/fmt/tests/simple_input.vv index 3bed273099..a7e0863d47 100644 --- a/vlib/v/fmt/tests/simple_input.vv +++ b/vlib/v/fmt/tests/simple_input.vv @@ -60,19 +60,6 @@ User } } - -[inline] -fn fn_contains_index_expr() { - arr := [1, 2, 3, 4, 5] - a := 1 in arr[0..] - b := 1 in arr[..2] - c := 1 in arr[1..3] - d := arr[2] - e := arr[2..] - f := arr[..2] - g := arr[1..3] -} - fn voidfn(){ println('this is a function that does not return anything') }