(t *testing.T)
| 150 | ) |
| 151 | |
| 152 | func TestPolygonInitSingleLoop(t *testing.T) { |
| 153 | if !PolygonFromLoops([]*Loop{EmptyLoop()}).IsEmpty() { |
| 154 | t.Errorf("polygon from Empty Loop should make an EmptyPolygon") |
| 155 | } |
| 156 | if !PolygonFromLoops([]*Loop{FullLoop()}).IsFull() { |
| 157 | t.Errorf("polygon from Full Loop should make a FullPolygon") |
| 158 | } |
| 159 | p := PolygonFromLoops([]*Loop{makeLoop("0:0, 0:10, 10:0")}) |
| 160 | if got, want := p.numVertices, 3; got != want { |
| 161 | t.Errorf("%v.numVertices = %v, want %v", p, got, want) |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | func TestPolygonEmpty(t *testing.T) { |
| 166 | shape := emptyPolygon |
nothing calls this directly
no test coverage detected
searching dependent graphs…