From edada22ac044b4d47462317a5686f2e5cabd7f1e Mon Sep 17 00:00:00 2001 From: yusing Date: Thu, 24 Apr 2025 15:45:34 +0800 Subject: [PATCH] fix: tests --- internal/utils/trie/any_test.go | 2 +- internal/utils/trie/key_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/utils/trie/any_test.go b/internal/utils/trie/any_test.go index 5d91d0d..3855993 100644 --- a/internal/utils/trie/any_test.go +++ b/internal/utils/trie/any_test.go @@ -10,7 +10,7 @@ func TestStoreNil(t *testing.T) { if v.Load() != nil { t.Fatal("expected nil") } - if v.IsNil() { + if !v.IsNil() { t.Fatal("expected true") } } diff --git a/internal/utils/trie/key_test.go b/internal/utils/trie/key_test.go index 3dabcfc..9079a6b 100644 --- a/internal/utils/trie/key_test.go +++ b/internal/utils/trie/key_test.go @@ -76,7 +76,7 @@ func TestClone(t *testing.T) { if !reflect.DeepEqual(k, cl) { t.Errorf("Clone() = %v, want %v", cl, k) } - cl.With("new") + cl = cl.With("new") if cl == k { t.Error("Clone() returns same pointer") }