pkg/infrastructure/ast/ast_go/parser_panic_test.go
package ast_go
import (
"github.com/modernizing/coca/cocatest"
"path/filepath"
"testing"
)
func Test_ShouldPainWhenReadFileError(t *testing.T) {
t.Parallel()
cocatest.AssertPanic(t, errorReadFile)
}
func errorReadFile() {
abs, _ := filepath.Abs("../../pkg/domain/code_file.go2")
testParser.ProcessFile(abs)
}