MCPcopy
hub / github.com/minio/minio-go / TestIntSetAdd

Function TestIntSetAdd

pkg/set/set_test.go:46–55  ·  view source on GitHub ↗

Test Add() and Contains()

(t *testing.T)

Source from the content-addressed store, hash-verified

44
45// Test Add() and Contains()
46func TestIntSetAdd(t *testing.T) {
47 s := New[int]()
48 s.Add(42)
49 if !s.Contains(42) {
50 t.Fatalf("expected set to contain 42")
51 }
52 if s.Contains(99) {
53 t.Fatalf("expected set not to contain 99")
54 }
55}
56
57// Test Remove()
58func TestIntSetRemove(t *testing.T) {

Callers

nothing calls this directly

Calls 2

AddMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected