test(build):case with llgo test ./...

This commit is contained in:
luoliwoshang
2025-06-24 15:23:12 +08:00
parent b469fc990f
commit 3df783de13
9 changed files with 73 additions and 2 deletions

5
test/bar/bar.go Normal file
View File

@@ -0,0 +1,5 @@
package bar
func Bar() int {
return 2
}

13
test/bar/bar_test.go Normal file
View File

@@ -0,0 +1,13 @@
package bar_test
import (
"testing"
"github.com/goplus/llgo/test/bar"
)
func TestBar(t *testing.T) {
if bar.Bar() != 2 {
t.Fatal("Bar() != 2")
}
}

View File

@@ -0,0 +1,5 @@
package barinner
func BarInner() int {
return 2
}

View File

@@ -0,0 +1,13 @@
package barinner_test
import (
"testing"
"github.com/goplus/llgo/test/bar/barinner"
)
func TestBarInner(t *testing.T) {
if barinner.BarInner() != 2 {
t.Fatal("BarInner() != 2")
}
}

5
test/foo/foo.go Normal file
View File

@@ -0,0 +1,5 @@
package foo
func Foo() int {
return 1
}

13
test/foo/foo_test.go Normal file
View File

@@ -0,0 +1,13 @@
package foo_test
import (
"testing"
"github.com/goplus/llgo/test/foo"
)
func TestFoo(t *testing.T) {
if foo.Foo() != 1 {
t.Fatal("Foo() != 1")
}
}