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

Function TestLoopEmptyLoop

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

Source from the content-addressed store, hash-verified

165)
166
167func TestLoopEmptyLoop(t *testing.T) {
168 shape := EmptyLoop()
169
170 if got, want := shape.NumEdges(), 0; got != want {
171 t.Errorf("shape.NumEdges() = %v, want %v", got, want)
172 }
173 if got, want := shape.NumChains(), 0; got != want {
174 t.Errorf("shape.NumChains() = %v, want %v", got, want)
175 }
176 if got, want := shape.Dimension(), 2; got != want {
177 t.Errorf("shape.Dimension() = %v, want %v", got, want)
178 }
179 if !shape.IsEmpty() {
180 t.Errorf("shape.IsEmpty() = false, want true")
181 }
182 if shape.IsFull() {
183 t.Errorf("shape.IsFull() = true, want false")
184 }
185 if !shape.isEmptyOrFull() {
186 t.Errorf("shape.isEmptyOrFull = false, want true")
187 }
188 if shape.ReferencePoint().Contained {
189 t.Errorf("shape.ReferencePoint().Contained = true, want false")
190 }
191}
192
193func TestLoopFullLoop(t *testing.T) {
194 shape := FullLoop()

Callers

nothing calls this directly

Calls 8

EmptyLoopFunction · 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…