1fn test_array_to_string_conversion() { 2 a := ['1', '2', '3', '4'] 3 assert a.str() == "['1', '2', '3', '4']" 4 5 b := [1, 2, 3, 4] 6 assert b.str() == '[1, 2, 3, 4]' 7 8 c := [1.1, 2.2, 3.3, 4.4] 9 assert c.str() == '[1.1, 2.2, 3.3, 4.4]' 10 11 d := [i16(1), 2, 3] 12 assert d.str() == '[1, 2, 3]' 13 14 e := [i64(1), 2, 3] 15 assert e.str() == '[1, 2, 3]' 16} 17 18fn test_interpolation_array_to_string() { 19 a := ['1', '2', '3'] 20 assert '$a' == "['1', '2', '3']" 21 22 b := [1, 2, 3, 4] 23 assert '$b' == '[1, 2, 3, 4]' 24 25 c := [1.1, 2.2, 3.3, 4.4] 26 assert '$c' == '[1.1, 2.2, 3.3, 4.4]' 27 28 d := [i16(1), 2, 3] 29 assert '$d' == '[1, 2, 3]' 30 31 e := [i64(1), 2, 3] 32 assert '$e' == '[1, 2, 3]' 33} 34 35fn test_interpolation_array_of_map_to_string() { 36 mut ams := []map[string]string{} 37 ams << {'a': 'b', 'c': 'd'} 38 ams << {'e': 'f', 'g': 'h'} 39 assert '$ams' == "[{'a': 'b', 'c': 'd'}, {'e': 'f', 'g': 'h'}]" 40} 41