MCPcopy
hub / github.com/golang/geo / TestLoopFullLoop

Function TestLoopFullLoop

s2/loop_test.go:193–217  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

191}
192
193func TestLoopFullLoop(t *testing.T) {
194 shape := FullLoop()
195
196 if got, want := shape.NumEdges(), 0; got != want {
197 t.Errorf("shape.NumEdges() = %v, want %v", got, want)
198 }
199 if got, want := shape.NumChains(), 1; got != want {
200 t.Errorf("shape.NumChains() = %v, want %v", got, want)
201 }
202 if got, want := shape.Dimension(), 2; got != want {
203 t.Errorf("shape.Dimension() = %v, want %v", got, want)
204 }
205 if shape.IsEmpty() {
206 t.Errorf("shape.IsEmpty() = true, want false")
207 }
208 if !shape.IsFull() {
209 t.Errorf("shape.IsFull() = false, want true")
210 }
211 if !shape.isEmptyOrFull() {
212 t.Errorf("shape.isEmptyOrFull = false, want true")
213 }
214 if !shape.ReferencePoint().Contained {
215 t.Errorf("shape.ReferencePoint().Contained = false, want true")
216 }
217}
218
219func TestLoopBasic(t *testing.T) {
220 shape := Shape(makeLoop("0:0, 0:1, 1:0"))

Callers

nothing calls this directly

Calls 8

FullLoopFunction · 0.85
isEmptyOrFullMethod · 0.80
NumEdgesMethod · 0.65
NumChainsMethod · 0.65
DimensionMethod · 0.65
IsEmptyMethod · 0.65
IsFullMethod · 0.65
ReferencePointMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…