Skip to content

Commit

Permalink
ut
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhi.li committed Jan 18, 2024
1 parent 5e79a6d commit 543b093
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkg/set/stringset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,24 @@ func TestStringSet_UnmarshalJSON(t *testing.T) {
},
wantErr: false,
},
{
name: "test floats",
set: NewStringSet(),
args: args{
data: []byte(`[1.1,2.2]`),
expectResult: []string{"1.1", "2.2"},
},
wantErr: false,
},
{
name: "test float",
set: NewStringSet(),
args: args{
data: []byte(`1.1`),
expectResult: []string{"1.1"},
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 543b093

Please sign in to comment.