clip_test.go raw
1 // SPDX-License-Identifier: Unlicense OR MIT
2
3 package clip
4
5 import (
6 "testing"
7
8 "github.com/p9c/p9/pkg/gel/gio/f32"
9 "github.com/p9c/p9/pkg/gel/gio/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 }
23