github.com/isyscore/isc-gobase@v1.5.3-0.20231218061332-cbc7451899e9/isc/test/range_test.go (about) 1 package test 2 3 import ( 4 "github.com/isyscore/isc-gobase/isc" 5 "testing" 6 ) 7 8 func TestRange(t *testing.T) { 9 om := isc.NewOrderMap[string, string]() 10 om.Put("a", "1") 11 om.Put("b", "2") 12 om.Put("c", "3") 13 for _, item := range isc.OrderMapToList(om) { 14 t.Logf("%s: %s", item.Key, item.Value) 15 } 16 17 for _, idx := range isc.IntStep(0, 10, 2) { 18 t.Logf("%d", idx) 19 } 20 21 }