github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/model/model_suite_test.go (about) 1 package model_test 2 3 import ( 4 "testing" 5 6 . "github.com/onsi/ginkgo/v2" 7 . "github.com/onsi/gomega" 8 ) 9 10 func TestModel(t *testing.T) { 11 RegisterFailHandler(Fail) 12 RunSpecs(t, "Model Suite") 13 } 14 15 func expectErrOrNil(actual, expected error) { 16 assertion := Expect(actual) 17 if expected == nil { 18 assertion.To(BeNil()) 19 return 20 } 21 assertion.To(MatchError(expected)) 22 }