v2 / vlib / v / tests / builtin_arrays / array_string_test.v
11 lines · 10 sloc · 196 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1fn test_array() {
2 mut strs := ['abc', 'cde']!
3 strs[0] += 'def'
4 assert strs[0] == 'abcdef'
5}
6
7fn test_fixed_array() {
8 mut strs := ['abc', 'cde']
9 strs[0] += 'def'
10 assert strs[0] == 'abcdef'
11}
12