elvish/edit/ceildiv_test.go
2015-02-26 15:32:49 +01:00

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)
}
}
}