Skip to content

Commit

Permalink
add: map equal
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatDiscovery committed Feb 10, 2025
1 parent 01e8b67 commit 78ac141
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/basic/collection/map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"github.com/stretchr/testify/assert"
"maps"
"testing"
)

Expand All @@ -20,7 +21,8 @@ func TestMapEqual(t *testing.T) {
m2 := map[string]int{"a": 1, "b": 2}
assert.Equal(t, m1, m2)
m3 := map[string]int{"a": 1, "b": 3}
assert.Equal(t, m1, m3)
assert.NotEqual(t, m1, m3)
assert.False(t, maps.Equal(m1, m3))
}

func TestMapPointer(t *testing.T) {
Expand Down

0 comments on commit 78ac141

Please sign in to comment.