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

sort structs: handle fixed size arrays

This commit is contained in:
Alexander Medvednikov
2019-12-12 13:51:05 +03:00
parent 576618d8cc
commit 88ec9c235d
3 changed files with 36 additions and 4 deletions

View File

@ -14,6 +14,9 @@ fn test_add() {
assert a.ends_with('bbbbb')
a += '123'
assert a.ends_with('3')
mut foo := Foo{0, 'hi'}
foo.str += '!'
assert foo.str == 'hi!'
}
fn test_ends_with() {
@ -418,6 +421,8 @@ fn test_reverse() {
struct Foo {
bar int
mut:
str string
}
fn (f Foo) baz() string {
@ -584,6 +589,7 @@ fn test_inter_before_comp_if() {
$if linux {
println(s)
}
assert s == '123'
}
fn test_double_quote_inter() {