Files
llgo/test/c_test.go

22 lines
339 B
Go
Raw Normal View History

2025-03-19 11:23:40 +08:00
//go:build llgo
// +build llgo
package test
import (
"testing"
2025-04-03 15:52:18 +08:00
"github.com/goplus/lib/c"
2025-03-19 11:23:40 +08:00
)
// 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")
}
}