cl: support llgo.cstr
This commit is contained in:
@@ -25,6 +25,24 @@ import (
|
||||
"golang.org/x/tools/go/ssa"
|
||||
)
|
||||
|
||||
func TestCStrNoArgs(t *testing.T) {
|
||||
defer func() {
|
||||
if r := recover(); r == nil {
|
||||
t.Fatal("cstr: no error?")
|
||||
}
|
||||
}()
|
||||
cstr(nil, nil)
|
||||
}
|
||||
|
||||
func TestCStrNonconst(t *testing.T) {
|
||||
defer func() {
|
||||
if r := recover(); r == nil {
|
||||
t.Fatal("cstr: no error?")
|
||||
}
|
||||
}()
|
||||
cstr(nil, []ssa.Value{&ssa.Parameter{}})
|
||||
}
|
||||
|
||||
func TestPkgNoInit(t *testing.T) {
|
||||
pkg := types.NewPackage("foo", "foo")
|
||||
ctx := &context{
|
||||
|
||||
Reference in New Issue
Block a user