MCPcopy Index your code
hub / github.com/EngoEngine/engo / TestPointPointAddition

Function TestPointPointAddition

math_test.go:42–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func TestPointPointAddition(t *testing.T) {
43 a := Point{2, 5}
44 b := Point{3, 1}
45 a.Add(b)
46 if a.X != 5 {
47 t.Errorf("a.X should equal 5 not %v", a.X)
48 }
49
50 if a.Y != 6 {
51 t.Errorf("a.Y should equal 6 not %v", a.Y)
52 }
53}
54
55func TestPointPointSubtraction(t *testing.T) {
56 a := Point{10, 15}

Callers

nothing calls this directly

Calls 1

AddMethod · 0.95

Tested by

no test coverage detected