coverage goal is 70% by the end of the night.

This commit is contained in:
Will Charczuk 2016-08-05 20:44:40 -07:00
parent 95d0bcca4b
commit 54f3bd4d3a
4 changed files with 77 additions and 1 deletions

View file

@ -126,3 +126,20 @@ func TestBoxOuterConstrain(t *testing.T) {
assert.Equal(85, d.Right, d.String())
assert.Equal(95, d.Bottom, d.String())
}
func TestBoxShift(t *testing.T) {
assert := assert.New(t)
b := Box{
Top: 5,
Left: 5,
Right: 10,
Bottom: 10,
}
shifted := b.Shift(1, 2)
assert.Equal(7, shifted.Top)
assert.Equal(6, shifted.Left)
assert.Equal(11, shifted.Right)
assert.Equal(12, shifted.Bottom)
}