mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
21 lines
325 B
Go
21 lines
325 B
Go
package edit
|
|
|
|
import "testing"
|
|
|
|
var ceilDivTests = []struct {
|
|
a, b, out int
|
|
}{
|
|
{9, 3, 3},
|
|
{10, 3, 4},
|
|
{11, 3, 4},
|
|
{12, 3, 4},
|
|
}
|
|
|
|
func TestCeilDiv(t *testing.T) {
|
|
for _, tt := range ceilDivTests {
|
|
if o := CeilDiv(tt.a, tt.b); o != tt.out {
|
|
t.Errorf("CeilDiv(%v, %v) => %v, want %v", tt.a, tt.b, o, tt.out)
|
|
}
|
|
}
|
|
}
|