(t *testing.T)
| 755 | } |
| 756 | |
| 757 | func TestPointMethodChain(t *testing.T) { |
| 758 | p1 := Point{X: 2, Y: 2} |
| 759 | p2 := Point{X: 5, Y: 5} |
| 760 | |
| 761 | p1.Add(p2).Multiply(p2).Subtract(*p2.MultiplyScalar(2)).AddScalar(25).SubtractScalar(8) |
| 762 | |
| 763 | if p1.X != 42 { |
| 764 | t.Errorf("Point method chain failed. p1.X should be 42, not %v", p1.X) |
| 765 | } |
| 766 | |
| 767 | if p1.Y != 42 { |
| 768 | t.Errorf("Point method chain failed. p1.Y should be 42, not %v", p1.Y) |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | func TestMatrixSet(t *testing.T) { |
| 773 | m := IdentityMatrix() |
nothing calls this directly
no test coverage detected