25 lines
350 B
Go
25 lines
350 B
Go
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
|
|
|
|
package ds
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
var (
|
|
)
|
|
|
|
func TestNewSet(t *testing.T) {
|
|
s := NewSet[string]()
|
|
assert.NotNil(t, s)
|
|
s["foo"] = true
|
|
assert.True(t, s.Contains("foo"))
|
|
|
|
s.Add("bar")
|
|
|
|
assert.True(t, s.Contains("bar"))
|
|
|
|
|
|
}
|