Skip to content

Commit 6495cb5

Browse files
committed
Adjust benchmark
1 parent 18d2e7b commit 6495cb5

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

hashstructure_test.go

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -779,27 +779,29 @@ func TestHash_golden(t *testing.T) {
779779

780780
func BenchmarkMap(b *testing.B) {
781781
m := map[string]any{
782-
"a": "b",
783-
"c": "d",
784-
"e": "f",
785-
"g": "h",
786-
"i": "j",
787-
"k": "l",
788-
"m": "n",
789-
"o": "p",
790-
"q": "r",
791-
"s": "t",
792-
"nested": map[string]string{
793-
"a": "b",
794-
"c": "d",
795-
"e": "f",
796-
"g": "h",
797-
"i": "j",
798-
"k": "l",
799-
"m": "n",
800-
"o": "p",
801-
"q": "r",
802-
"s": "t",
782+
"int16": int16(42),
783+
"int32": int32(42),
784+
"int64": int64(42),
785+
"int": int(42),
786+
"uint16": uint16(42),
787+
"uint32": uint32(42),
788+
"uint64": uint64(42),
789+
"uint": uint(42),
790+
"float32": float32(42),
791+
"float64": float64(42),
792+
"complex64": complex64(42),
793+
"complex128": complex128(42),
794+
"string": "foo",
795+
"bool": true,
796+
"slice": []string{"foo", "bar"},
797+
"sliceint": []int{1, 2, 3},
798+
"map": map[string]string{"foo": "bar"},
799+
"struct": struct {
800+
Foo string
801+
Bar []interface{}
802+
}{
803+
Foo: "foo",
804+
Bar: []interface{}{nil, nil, nil},
803805
},
804806
}
805807

0 commit comments

Comments
 (0)