github.com/isyscore/isc-gobase@v1.5.3-0.20231218061332-cbc7451899e9/isc/test/equal_test.go (about) 1 package test 2 3 import ( 4 "testing" 5 6 "github.com/isyscore/isc-gobase/isc" 7 ) 8 9 func TestEqual(t *testing.T) { 10 l1 := []int{1, 2, 3} 11 l2 := []int{1, 2, 3} 12 l3 := []int{1, 2, 4} 13 b1 := isc.ListEquals(l1, l2) 14 t.Logf("l1 == l2: %v", b1) 15 b2 := isc.ListEquals(l1, l3) 16 t.Logf("l1 == l3: %v", b2) 17 18 m1 := map[string]int{"a": 1, "b": 2} 19 m2 := map[string]int{"a": 1, "b": 2} 20 m3 := map[string]int{"a": 1, "b": 3} 21 b1 = isc.MapEquals(m1, m2) 22 t.Logf("m1 == m2: %v", b1) 23 b2 = isc.MapEquals(m1, m3) 24 t.Logf("m1 == m3: %v", b2) 25 }