fix: fix testing

上级 176adca9
......@@ -28,6 +28,9 @@ func (c *CodeMember) BuildMemberId() {
if c.FileID != c.AliasPackage {
packageName = c.FileID + "|" + c.AliasPackage
}
if c.FileID == "" && c.AliasPackage != "" {
packageName = c.AliasPackage
}
c.ID = packageName + "::" + c.DataStructID
}
}
......@@ -180,7 +180,7 @@ func Test_ShowShowSelfMethodCall(t *testing.T) {
results := testParser.ProcessString(`
package node_infos
import "fmpt"
import "fmt"
func ShowChangeLogSummary() {
changeMap := BuildChangeMap(commits)
......
package cocago
import (
. "github.com/onsi/gomega"
"github.com/phodal/coca/cocatest"
"testing"
)
func getRegressionFile(name string) string {
return "testdata/regression/" + name
}
func Test_Regression1(t *testing.T) {
t.Parallel()
g := NewGomegaWithT(t)
filePath := getRegressionFile("coll_stack")
results := testParser.ProcessFile(filePath + ".code")
g.Expect(cocatest.JSONFileBytesEqual(results, filePath+".json")).To(Equal(true))
}
// todo: fix package issues with input
//func Test_Regression1(t *testing.T) {
// t.Parallel()
// g := NewGomegaWithT(t)
//
// filePath := getRegressionFile("coll_stack")
// results := testParser.ProcessFile(filePath + ".code")
// g.Expect(cocatest.JSONFileBytesEqual(results, filePath+".json")).To(Equal(true))
//}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册