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

cgen: fix array_sort by different order of a/b (#9106)

This commit is contained in:
yuyi
2021-03-04 18:19:02 +08:00
committed by GitHub
parent d08f994e19
commit 2b9ffbda42
3 changed files with 20 additions and 6 deletions

View File

@ -106,10 +106,10 @@ fn test_sort_reverse() {
len := vals.len
vals.sort(b>a)
assert len == vals.len
assert vals[3] == 'a'
assert vals[2] == 'an'
assert vals[1] == 'any'
assert vals[0] == 'arr'
assert vals[0] == 'a'
assert vals[1] == 'an'
assert vals[2] == 'any'
assert vals[3] == 'arr'
}
fn test_split_nth() {