1
0
Fork 0
gilo/internal/gilo/point_test.go

29 lines
488 B
Go
Raw Normal View History

2021-04-02 19:24:20 -04:00
package gilo
import "testing"
func TestDefaultPoint(t *testing.T) {
point := DefaultPoint()
if point.X != 0 || point.Y != 0 {
t.Errorf("Failure to create proper Point")
}
}
func TestNewPoint(t *testing.T) {
point := NewPoint(3, 5)
if point.X != 3 || point.Y != 5 {
t.Errorf("Failure to create proper Point")
}
}
2023-10-04 12:50:21 -04:00
func TestPoint_Clone(t *testing.T) {
point := DefaultPoint()
point2 := point.Clone()
if point == point2 {
t.Errorf("Point is identical, not cloned")
}
}