fix: tests

This commit is contained in:
yusing 2025-04-24 15:45:34 +08:00
parent 76fb0cfdbb
commit edada22ac0
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ func TestStoreNil(t *testing.T) {
if v.Load() != nil { if v.Load() != nil {
t.Fatal("expected nil") t.Fatal("expected nil")
} }
if v.IsNil() { if !v.IsNil() {
t.Fatal("expected true") t.Fatal("expected true")
} }
} }

View file

@ -76,7 +76,7 @@ func TestClone(t *testing.T) {
if !reflect.DeepEqual(k, cl) { if !reflect.DeepEqual(k, cl) {
t.Errorf("Clone() = %v, want %v", cl, k) t.Errorf("Clone() = %v, want %v", cl, k)
} }
cl.With("new") cl = cl.With("new")
if cl == k { if cl == k {
t.Error("Clone() returns same pointer") t.Error("Clone() returns same pointer")
} }