(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func TestHeightChanges(t *testing.T) { |
| 9 | for i := 0; i < 4; i++ { |
| 10 | fmt.Println() |
| 11 | } |
| 12 | Up(3) |
| 13 | |
| 14 | if autoheight != 3 { |
| 15 | t.Errorf("height should be 3 but is %d", autoheight) |
| 16 | } |
| 17 | |
| 18 | Down(3) |
| 19 | |
| 20 | if autoheight != 0 { |
| 21 | t.Errorf("height should be 0 but is %d", autoheight) |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | func TestHeightCannotBeNegative(t *testing.T) { |
| 26 | Down(10) |