mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: extract array_slices_input.vv from simple_input.vv
This commit is contained in:
parent
c731615dbb
commit
2bed0d1bb5
11
vlib/v/fmt/tests/array_slices_expected.vv
Normal file
11
vlib/v/fmt/tests/array_slices_expected.vv
Normal file
@ -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]
|
||||
}
|
12
vlib/v/fmt/tests/array_slices_input.vv
Normal file
12
vlib/v/fmt/tests/array_slices_input.vv
Normal file
@ -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]
|
||||
}
|
@ -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')
|
||||
}
|
||||
|
@ -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')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user