map: add map['aa']+='str' test

pull/5555/head
yuyi 2020-06-28 19:34:59 +08:00 committed by GitHub
parent 9814497b91
commit 05de780219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -283,3 +283,10 @@ fn test_map_in_directly() {
assert v == 1
}
}
fn test_plus_assign_string() {
mut m := {'one': ''}
m['one'] += '1'
assert m.len == 1
assert m['one'] == '1'
}