tools: new tool to extracts function names declared in V files

This commit is contained in:
Delyan Angelov 2019-10-21 14:14:28 +03:00 committed by Alexander Medvednikov
parent cd8b0d04bb
commit eef73eea22
12 changed files with 184 additions and 40 deletions

View file

@ -121,6 +121,20 @@ fn test_right() {
assert b[1] == 3
}
fn test_right_with_n_bigger_than_array_size() {
a := [1, 2, 3, 4]
mut b := a.right(10)
assert b.len == 0
// also check that the result of a.right
// is an array of the same type/element size as a:
b << 5
b << 6
assert b.len == 2
assert b[0] == 5
assert b[1] == 6
}
fn test_left() {
a := [1, 2, 3]
b := a.left(2)