(t *testing.T)
| 5 | ) |
| 6 | |
| 7 | func TestDistance(t *testing.T) { |
| 8 | p1 := Point{0, 0} |
| 9 | p2 := Point{3, 4} |
| 10 | var wantedDistance float64 = 5 |
| 11 | var calculatedDistance float64 = Distance(&p1, &p2) |
| 12 | if calculatedDistance != wantedDistance { |
| 13 | t.Fatalf("Failed to calculate Distance.") |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | func TestSection(t *testing.T) { |
| 18 | p1 := Point{1, 0} |
nothing calls this directly
no test coverage detected