Skip to content

Commit

Permalink
update: mapset iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatDiscovery committed Jun 26, 2024
1 parent 43eaae8 commit 823a074
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/basic/collection/set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,16 @@ func TestSetDifference(t *testing.T) {
fmt.Println(slice)
fmt.Println(difference.Cardinality())
}

func TestIterator(t *testing.T) {
// Create a string-based set of required classes.
set1 := mapset.NewSet[string]()
set1.Add("cooking")
set1.Add("english")
set1.Add("math")
set1.Add("biology")

for s := range set1.Iter() {
fmt.Println(s)
}
}

0 comments on commit 823a074

Please sign in to comment.