blob: 9073b0ea5b283bc7f7810b0eafb9e8eac8e5f9f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
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)
})
}
|