github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/transform/rtcalls_test.go (about) 1 package transform_test 2 3 import ( 4 "testing" 5 6 "github.com/tinygo-org/tinygo/transform" 7 "tinygo.org/x/go-llvm" 8 ) 9 10 func TestOptimizeStringToBytes(t *testing.T) { 11 t.Parallel() 12 testTransform(t, "testdata/stringtobytes", func(mod llvm.Module) { 13 // Run optimization pass. 14 transform.OptimizeStringToBytes(mod) 15 }) 16 } 17 18 func TestOptimizeStringEqual(t *testing.T) { 19 t.Parallel() 20 testTransform(t, "testdata/stringequal", func(mod llvm.Module) { 21 // Run optimization pass. 22 transform.OptimizeStringEqual(mod) 23 }) 24 } 25 26 func TestOptimizeReflectImplements(t *testing.T) { 27 t.Parallel() 28 testTransform(t, "testdata/reflect-implements", func(mod llvm.Module) { 29 // Run optimization pass. 30 transform.OptimizeReflectImplements(mod) 31 }) 32 }