示例#1
0
func TestNewPin(t *testing.T) {
	pin := dorothea.NewPin(nil)
	want := true
	if got := pin.IsInOutArea(); got != want {
		t.Errorf("pin.IsInOutArea() = %v, want %v", got, want)
	}
}
示例#2
0
func TestMoveTo(t *testing.T) {
	pin := dorothea.NewPin(nil)
	pin.MoveTo(33)
	want := true
	if got := pin.IsOnField(); got != want {
		t.Errorf("pin.IsOnField() = %v, want %v", got, want)
	}
}
示例#3
0
func TestMovePinFromOutAreaToField(t *testing.T) {
	pin := dorothea.NewPin(nil)
	pin.MoveTo(33)

	defer func() {
		if e := recover(); e != nil {
		}
	}()

	pin.MovePinFromOutAreaToField(12)
}