mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-31 00:57:48 +00:00
404b65941a
This allows for adding more advanced tests, for example tests that use the compiler package so that test sources can be written in Go instead of LLVM IR.
22 lines
450 B
Go
22 lines
450 B
Go
package transform_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/tinygo-org/tinygo/compileopts"
|
|
"github.com/tinygo-org/tinygo/transform"
|
|
"tinygo.org/x/go-llvm"
|
|
)
|
|
|
|
func TestCreateStackSizeLoads(t *testing.T) {
|
|
t.Parallel()
|
|
testTransform(t, "testdata/stacksize", func(mod llvm.Module) {
|
|
// Run optimization pass.
|
|
transform.CreateStackSizeLoads(mod, &compileopts.Config{
|
|
Target: &compileopts.TargetSpec{
|
|
DefaultStackSize: 1024,
|
|
},
|
|
})
|
|
})
|
|
}
|