Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
aliases
/
aliased_array_operations_test.v
16
lines
·
13
sloc
·
225 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
type
Ints = []int
2
3
fn
test_first() {
4
ints := Ints([5, 10])
5
assert ints.first() == 5
6
}
7
8
fn
test_last() {
9
ints := Ints([7, 4])
10
assert ints.last() == 4
11
}
12
13
fn
test_index() {
14
ints := Ints([1, 5, 2, 3])
15
assert ints[2] == 2
16
}
17