You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
729 B

package transform_test
import (
"testing"
"github.com/tinygo-org/tinygo/transform"
"tinygo.org/x/go-llvm"
)
func TestOptimizeStringToBytes(t *testing.T) {
t.Parallel()
testTransform(t, "testdata/stringtobytes", func(mod llvm.Module) {
// Run optimization pass.
transform.OptimizeStringToBytes(mod)
})
}
func TestOptimizeStringEqual(t *testing.T) {
t.Parallel()
testTransform(t, "testdata/stringequal", func(mod llvm.Module) {
// Run optimization pass.
transform.OptimizeStringEqual(mod)
})
}
func TestOptimizeReflectImplements(t *testing.T) {
t.Parallel()
testTransform(t, "testdata/reflect-implements", func(mod llvm.Module) {
// Run optimization pass.
transform.OptimizeReflectImplements(mod)
})
}