@@ -1015,7 +1015,7 @@ func TestCloneAndClear_MapKeyValue(t *testing.T) {
10151015}
10161016
10171017func TestDeepEqual_MapKeyValue (t * testing.T ) {
1018- t .Run ("test DeepEqual for NewMapKeyValue[string, struct] with keys" , func (t * testing.T ) {
1018+ t .Run ("test DeepEqual for NewMapKeyValue[string, struct] with keys disordered and same size " , func (t * testing.T ) {
10191019 type testStruct struct {
10201020 Name string
10211021 value float64
@@ -1027,9 +1027,9 @@ func TestDeepEqual_MapKeyValue(t *testing.T) {
10271027 kv1 .Set ("Euler" , testStruct {"This is Euler's Number (e)" , 2.7182 })
10281028 kv1 .Set ("Golden Ratio" , testStruct {"This is The Golden Ratio" , 1.6180 })
10291029
1030+ kv2 .Set ("Golden Ratio" , testStruct {"This is The Golden Ratio" , 1.6180 })
10301031 kv2 .Set ("Archimedes" , testStruct {"This is Archimedes' Constant (Pi)" , 3.1415 })
10311032 kv2 .Set ("Euler" , testStruct {"This is Euler's Number (e)" , 2.7182 })
1032- kv2 .Set ("Golden Ratio" , testStruct {"This is The Golden Ratio" , 1.6180 })
10331033
10341034 if kv1 .Size () != 3 {
10351035 t .Errorf ("Expected size to be %v, got %v" , 3 , kv1 .Size ())
@@ -1039,11 +1039,11 @@ func TestDeepEqual_MapKeyValue(t *testing.T) {
10391039 }
10401040
10411041 if kv1 .DeepEqual (kv2 ) == false {
1042- t .Errorf ("Expected DeepEqual to be equal, got %v" , true )
1042+ t .Errorf ("Expected DeepEqual to be equal, got %v" , kv1 . DeepEqual ( kv2 ) )
10431043 }
10441044
10451045 if kv2 .DeepEqual (kv1 ) == false {
1046- t .Errorf ("Expected DeepEqual to be equal, got %v" , true )
1046+ t .Errorf ("Expected DeepEqual to be equal, got %v" , kv2 . DeepEqual ( kv1 ) )
10471047 }
10481048 })
10491049
@@ -1071,15 +1071,15 @@ func TestDeepEqual_MapKeyValue(t *testing.T) {
10711071 }
10721072
10731073 if kv1 .DeepEqual (kv2 ) == true {
1074- t .Errorf ("Expected DeepEqual to be equal , got %v" , true )
1074+ t .Errorf ("Expected DeepEqual to be different , got %v" , kv1 . DeepEqual ( kv2 ) )
10751075 }
10761076
10771077 if kv2 .DeepEqual (kv1 ) == true {
1078- t .Errorf ("Expected DeepEqual to be equal , got %v" , true )
1078+ t .Errorf ("Expected DeepEqual to be different , got %v" , kv2 . DeepEqual ( kv1 ) )
10791079 }
10801080 })
10811081
1082- t .Run ("test DeepEqual for NewMapKeyValue[string, struct] with keys and it is not equal different size" , func (t * testing.T ) {
1082+ t .Run ("test DeepEqual for NewMapKeyValue[string, struct] with keys and it is different and different size" , func (t * testing.T ) {
10831083 type testStruct struct {
10841084 Name string
10851085 value float64
0 commit comments