1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: minor array fixes

This commit is contained in:
Alexander Medvednikov
2020-12-20 16:08:56 +01:00
parent 3c210a57f9
commit 50a6976b5e
12 changed files with 357 additions and 417 deletions

View File

@@ -5,14 +5,14 @@ const (
)
fn test_sorting_simple() {
mut a := unsorted
mut a := unsorted.clone()
a.sort()
eprintln(' a: $a')
assert a == sorted_asc
}
fn test_sorting_with_condition_expression() {
mut a := unsorted
mut a := unsorted.clone()
a.sort(a > b)
eprintln(' a: $a')
assert a == sorted_desc
@@ -23,7 +23,7 @@ fn mysort(mut a []int) {
}
fn test_sorting_by_passing_a_mut_array_to_a_function() {
mut a := unsorted
mut a := unsorted.clone()
mysort(mut a)
eprintln(' a: $a')
assert a == sorted_asc