TestReplaceGoName

This commit is contained in:
xushiwei
2024-06-13 03:00:55 +08:00
parent 7235357ef5
commit b70b868552
3 changed files with 8 additions and 0 deletions

View File

@@ -27,6 +27,12 @@ import (
"golang.org/x/tools/go/ssa"
)
func TestReplaceGoName(t *testing.T) {
if ret := replaceGoName("foo", 0); ret != "foo" {
t.Fatal("replaceGoName:", ret)
}
}
func TestIsAllocVargs(t *testing.T) {
if isAllocVargs(nil, ssaAlloc(&ssa.Return{})) {
t.Fatal("isVargs?")