From 79575a98c0c9e9ebfe493a5137af2654aaf025e2 Mon Sep 17 00:00:00 2001 From: qydysky Date: Fri, 26 May 2023 02:33:46 +0800 Subject: [PATCH] add --- sync/Map_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sync/Map_test.go b/sync/Map_test.go index 609d2c9..fa71d0f 100644 --- a/sync/Map_test.go +++ b/sync/Map_test.go @@ -336,7 +336,8 @@ func Benchmark_syncMap_Range(b *testing.B) { func TestMapExceeded1(t *testing.T) { var m MapExceeded[string, []byte] - m.Store("1", []byte("1"), time.Second) + var data = []byte("1") + m.Store("1", &data, time.Second) if b, ok := m.Load("1"); !ok || 0 != bytes.Compare(*b, []byte("1")) { t.Fatal(ok, b) } -- 2.39.2