github.com/cybriq/giocore@v0.0.7-0.20210703034601-cfb9cb5f3900/op/clip/clip_test.go (about) 1 // SPDX-License-Identifier: Unlicense OR MIT 2 3 package clip 4 5 import ( 6 "testing" 7 8 "github.com/cybriq/giocore/f32" 9 "github.com/cybriq/giocore/op" 10 ) 11 12 func TestOpenPathOutlinePanic(t *testing.T) { 13 defer func() { 14 if err := recover(); err == nil { 15 t.Error("Outline of an open path didn't panic") 16 } 17 }() 18 var p Path 19 p.Begin(new(op.Ops)) 20 p.Line(f32.Pt(10, 10)) 21 Outline{Path: p.End()}.Op() 22 }