mv _testcgo => _testrt

This commit is contained in:
xushiwei
2024-04-30 23:18:18 +08:00
parent f7a54e3377
commit d3fddfb634
24 changed files with 9 additions and 5 deletions

View File

@@ -5,10 +5,12 @@ source_filename = "main"
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
@"main.init$guard" = global ptr null
@0 = private unnamed_addr constant [13 x i8] c"Hello world\0A\00", align 1
define %"github.com/goplus/llgo/internal/runtime.String" @main.hello() {
_llgo_0:
ret [13 x i8] c"Hello world\0A\00"
%0 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.NewString"(ptr @0, i64 12)
ret %"github.com/goplus/llgo/internal/runtime.String" %0
}
define void @main.init() {
@@ -36,6 +38,8 @@ _llgo_0:
ret void
}
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.NewString"(ptr, i64)
declare i64 @"github.com/goplus/llgo/internal/runtime.StringLen"(%"github.com/goplus/llgo/internal/runtime.Slice")
declare ptr @"github.com/goplus/llgo/internal/runtime.CStrCopy"(ptr, %"github.com/goplus/llgo/internal/runtime.String")

View File

@@ -28,8 +28,8 @@ func testCompile(t *testing.T, src, expected string) {
cltest.TestCompileEx(t, src, "foo.go", expected)
}
func TestFromTestcgo(t *testing.T) {
cltest.FromDir(t, "allocstr", "./_testcgo", true)
func TestFromTestrt(t *testing.T) {
cltest.FromDir(t, "", "./_testrt", true)
}
func TestFromTestdata(t *testing.T) {

View File

@@ -22,8 +22,8 @@ import (
"github.com/goplus/llgo/cl/cltest"
)
func TestFromTestcgo(t *testing.T) {
cltest.FromDir(t, "", "../cl/_testcgo", true)
func TestFromTestrt(t *testing.T) {
cltest.FromDir(t, "", "../cl/_testrt", true)
}
func TestFromTestdata(t *testing.T) {