ci: run llgo test ./...
This commit is contained in:
1
.github/workflows/llgo.yml
vendored
1
.github/workflows/llgo.yml
vendored
@@ -165,6 +165,7 @@ jobs:
|
|||||||
|
|
||||||
- name: run llgo test
|
- name: run llgo test
|
||||||
run: |
|
run: |
|
||||||
|
llgo test ./...
|
||||||
cd _demo
|
cd _demo
|
||||||
llgo test -v ./runtest
|
llgo test -v ./runtest
|
||||||
|
|
||||||
|
|||||||
21
test/c_test.go
Normal file
21
test/c_test.go
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
//go:build llgo
|
||||||
|
// +build llgo
|
||||||
|
|
||||||
|
package test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/goplus/llgo/c"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Can't put it in c/ package because it is marked as 'decl'
|
||||||
|
func TestCstr(t *testing.T) {
|
||||||
|
cstr := c.Str("foo")
|
||||||
|
if cstr == nil {
|
||||||
|
t.Fatal("cstr() returned nil")
|
||||||
|
}
|
||||||
|
if c.Strlen(cstr) != 3 {
|
||||||
|
t.Fatal("cstr() returned invalid length")
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user