github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/transform/stacksize_test.go (about)

     1  package transform_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/tinygo-org/tinygo/compileopts"
     7  	"github.com/tinygo-org/tinygo/transform"
     8  	"tinygo.org/x/go-llvm"
     9  )
    10  
    11  func TestCreateStackSizeLoads(t *testing.T) {
    12  	t.Parallel()
    13  	testTransform(t, "testdata/stacksize", func(mod llvm.Module) {
    14  		// Run optimization pass.
    15  		transform.CreateStackSizeLoads(mod, &compileopts.Config{
    16  			Options: &compileopts.Options{},
    17  			Target: &compileopts.TargetSpec{
    18  				DefaultStackSize: 1024,
    19  			},
    20  		})
    21  	})
    22  }