github.com/isyscore/isc-gobase@v1.5.3-0.20231218061332-cbc7451899e9/isc/test/list_test.go (about) 1 package test 2 3 import ( 4 "github.com/isyscore/isc-gobase/isc" 5 "testing" 6 ) 7 8 func TestList(t *testing.T) { 9 list := isc.NewList[string]() 10 list.Add("aaaa") 11 list.AddAll("bbbb", "ccc") 12 t.Logf("list: %v\n", list) 13 14 list.Clear() 15 t.Logf("list: %v\n", list) 16 17 } 18 19 func TestMap(t *testing.T) { 20 m := isc.NewMap[string, string]() 21 m["aa"] = "bb" 22 m.Put("cc", "dd") 23 t.Logf("m: %v\n", m) 24 m.Delete("cc") 25 t.Logf("m: %v\n", m) 26 m.Clear() 27 t.Logf("m: %v\n", m) 28 }