elvish/edit/ceildiv_test.go

21 lines
325 B
Go
Raw Normal View History

2015-02-26 22:32:49 +08:00
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)
}
}
}