1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/wtf_tests/position_test.go
2018-06-10 00:16:40 +03:00

28 lines
452 B
Go

package wtf_tests
import (
"testing"
. "github.com/andrewzolotukhin/wtf/wtf"
)
func TestPosition(t *testing.T) {
pos := NewPosition(0, 1, 2, 3)
if pos.Top() != 0 {
t.Fatalf("Expected 0 but got %d", pos.Top())
}
if pos.Left() != 1 {
t.Fatalf("Expected 1 but got %d", pos.Left())
}
if pos.Width() != 2 {
t.Fatalf("Expected 2 but got %d", pos.Width())
}
if pos.Height() != 3 {
t.Fatalf("Expected 3 but got %d", pos.Height())
}
}