From 05de7802192158e37562c8fd47467033f6a04972 Mon Sep 17 00:00:00 2001 From: yuyi Date: Sun, 28 Jun 2020 19:34:59 +0800 Subject: [PATCH] map: add map['aa']+='str' test --- vlib/builtin/map_test.v | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vlib/builtin/map_test.v b/vlib/builtin/map_test.v index 5e125523e7..7859b5d08a 100644 --- a/vlib/builtin/map_test.v +++ b/vlib/builtin/map_test.v @@ -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' +}