TestSetBlockEx

This commit is contained in:
xushiwei
2024-05-12 11:22:55 +08:00
parent fbb2150d88
commit f9ef9cab81

View File

@@ -25,6 +25,28 @@ import (
"github.com/goplus/llvm"
)
func TestSetBlock(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Log("SetBlock: no error?")
}
}()
fn := &aFunction{}
b := &aBuilder{Func: fn}
b.SetBlock(&aBasicBlock{})
}
func TestSetBlockEx(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Log("SetBlockEx: no error?")
}
}()
fn := &aFunction{}
b := &aBuilder{Func: fn}
b.SetBlockEx(&aBasicBlock{fn: fn}, -1)
}
func TestSetPython(t *testing.T) {
prog := NewProgram(nil)
typ := types.NewPackage("foo", "foo")