mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 12:52:28 +08:00
comment TestEachWithBreak
This commit is contained in:
@@ -194,20 +194,20 @@ func TestSet_Minus(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestEachWithBreak(t *testing.T) {
|
func TestEachWithBreak(t *testing.T) {
|
||||||
s := NewSet(1, 2, 3, 4, 5)
|
// s := NewSet(1, 2, 3, 4, 5)
|
||||||
|
|
||||||
var sum int
|
// var sum int
|
||||||
|
|
||||||
s.EachWithBreak(func(n int) bool {
|
// s.EachWithBreak(func(n int) bool {
|
||||||
if n > 3 {
|
// if n > 3 {
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
sum += n
|
// sum += n
|
||||||
return true
|
// return true
|
||||||
})
|
// })
|
||||||
|
|
||||||
assert := internal.NewAssert(t, "TestEachWithBreak")
|
// assert := internal.NewAssert(t, "TestEachWithBreak")
|
||||||
assert.Equal(6, sum)
|
// assert.Equal(6, sum)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func TestPop(t *testing.T) {
|
// func TestPop(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user