llgo/ssa: TestMakeInterface (32bits); ssa/ssatest

This commit is contained in:
xushiwei
2024-05-20 10:23:24 +08:00
parent 6335ac6a47
commit cc357b2b7d
6 changed files with 124 additions and 16 deletions

View File

@@ -21,10 +21,18 @@ import (
"go/token"
"go/types"
"testing"
"unsafe"
"github.com/goplus/llvm"
)
func TestPointerSize(t *testing.T) {
expected := unsafe.Sizeof(uintptr(0))
if size := NewProgram(nil).PointerSize(); size != int(expected) {
t.Fatal("bad PointerSize:", size)
}
}
func TestSetBlock(t *testing.T) {
defer func() {
if r := recover(); r == nil {