16 lines
197 B
Go
16 lines
197 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestInTarget(t *testing.T) {
|
|
target := targetArea{
|
|
startx: 20,
|
|
endx: 30,
|
|
starty: -10,
|
|
endy: -5,
|
|
}
|
|
if !InTarget(28, -7, target) {
|
|
t.Fail()
|
|
}
|
|
}
|