Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed May 26, 2023
1 parent 0542427 commit 530a32d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion graph/api_file_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package graph

import (
"github.com/opensibyl/sibyl2/pkg/core"
"path/filepath"
"runtime"
"testing"
Expand All @@ -11,7 +12,7 @@ import (
func TestFuncGraph_ToFileGraph(t *testing.T) {
_, curFile, _, _ := runtime.Caller(0)
src := filepath.Dir(filepath.Dir(curFile))
fg, err := CreateFuncGraphFromDirWithLSIF(src, filepath.Join(src, "dump.lsif"))
fg, err := CreateFuncGraphFromDirWithLSIF(src, filepath.Join(src, "dump.lsif"), core.LangGo)
assert.Nil(t, err)
assert.NotEmpty(t, fg.cache)
fileGraph, err := fg.ToFileGraph()
Expand Down
5 changes: 3 additions & 2 deletions graph/api_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package graph

import (
"github.com/opensibyl/sibyl2/pkg/core"
"os"
"path/filepath"
"runtime"
Expand All @@ -12,7 +13,7 @@ import (
func TestFuncGraph(t *testing.T) {
_, curFile, _, _ := runtime.Caller(0)
src := filepath.Dir(filepath.Dir(curFile))
fg, err := CreateFuncGraphFromDirWithLSIF(src, filepath.Join(src, "dump.lsif"))
fg, err := CreateFuncGraphFromDirWithLSIF(src, filepath.Join(src, "dump.lsif"), core.LangGo)
assert.Nil(t, err)
assert.NotEmpty(t, fg.cache)

Expand Down Expand Up @@ -41,7 +42,7 @@ func TestFuncGraph(t *testing.T) {
t.Run("RemoveNode", func(t *testing.T) {
before, err := fg.g.Order()
assert.Nil(t, err)
err = fg.RemoveNodeById("graph/api_test.go:#12-#50:graph||TestFuncGraph|*testing.T|")
err = fg.RemoveNodeById("graph/api_test.go:#13-#51:graph||TestFuncGraph|*testing.T|")
assert.Nil(t, err)
after, err := fg.g.Order()
assert.Nil(t, err)
Expand Down

0 comments on commit 530a32d

Please sign in to comment.