gilo/internal/gilo/point_test.go
Timothy Warren 4fdb0a607c
All checks were successful
timw4mail/gilo/pipeline/head This commit looks good
Slightly increase code coverage
2023-10-04 12:50:21 -04:00

29 lines
488 B
Go

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")
}
}
func TestPoint_Clone(t *testing.T) {
point := DefaultPoint()
point2 := point.Clone()
if point == point2 {
t.Errorf("Point is identical, not cloned")
}
}