aboutsummaryrefslogtreecommitdiff
path: root/sets_test.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2023-01-02 10:49:14 -0700
committerGitHub <noreply@github.com>2023-01-02 10:49:14 -0700
commit4dd1fd8b0a5501553e35fc21ecde1a6b1863c2ca (patch)
tree11208329fc4edf7c9b7167a1e7148b9e4ca69864 /sets_test.go
parentMerge pull request #34 from laher/sets (diff)
parentset/sorted-set: Items() to return slice of items (diff)
downloadpds-4dd1fd8b0a5501553e35fc21ecde1a6b1863c2ca.tar.gz
pds-4dd1fd8b0a5501553e35fc21ecde1a6b1863c2ca.tar.xz
Merge pull request #35 from laher/sets-maps-append-multi
Sets & maps append-multi. Also docs and a fix for SortedSets
Diffstat (limited to 'sets_test.go')
-rw-r--r--sets_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/sets_test.go b/sets_test.go
index d2e7f32..b3900fc 100644
--- a/sets_test.go
+++ b/sets_test.go
@@ -51,7 +51,7 @@ func TestSetsDelete(t *testing.T) {
func TestSortedSetsPut(t *testing.T) {
s := NewSortedSet[string](nil)
- s2 := s.Put("1").Put("1").Put("0")
+ s2 := s.Set("1").Set("1").Set("0")
if s.Len() != 0 {
t.Fatalf("Unexpected mutation of set")
}
@@ -85,7 +85,7 @@ func TestSortedSetsPut(t *testing.T) {
func TestSortedSetsDelete(t *testing.T) {
s := NewSortedSet[string](nil)
- s2 := s.Put("1")
+ s2 := s.Set("1")
s3 := s.Delete("1")
if s2.Len() != 1 {
t.Fatalf("Unexpected non-mutation of set")