Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
shenghui0779 committed Dec 12, 2022
1 parent d206943 commit a653814
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,14 @@ func TestSliceRand(t *testing.T) {
Name: "o",
},
}

ret4 := SliceRand(a4, 2)
assert.Equal(t, 2, len(ret4))
assert.NotEqual(t, a4[:2], ret4)

ret5 := SliceRand(a4, -1)
assert.Equal(t, len(a4), len(ret5))
assert.NotEqual(t, a4, ret5)
}

func TestCreateFile(t *testing.T) {
Expand Down

0 comments on commit a653814

Please sign in to comment.