tinygo/transform/stacksize_test.go
Ayke van Laethem 5f96d2b784 all: add flag for setting the goroutine stack size
This is helpful in some cases where the default stack size isn't big
enough.
2022-09-15 12:43:51 +02:00

22 строки
486 Б
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{
Options: &compileopts.Options{},
Target: &compileopts.TargetSpec{
DefaultStackSize: 1024,
},
})
})
}