github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/transform/interface-lowering_test.go (about) 1 package transform_test 2 3 import ( 4 "testing" 5 6 "github.com/tinygo-org/tinygo/transform" 7 "tinygo.org/x/go-llvm" 8 ) 9 10 func TestInterfaceLowering(t *testing.T) { 11 t.Parallel() 12 testTransform(t, "testdata/interface", func(mod llvm.Module) { 13 err := transform.LowerInterfaces(mod, defaultTestConfig) 14 if err != nil { 15 t.Error(err) 16 } 17 18 po := llvm.NewPassBuilderOptions() 19 defer po.Dispose() 20 err = mod.RunPasses("globaldce", llvm.TargetMachine{}, po) 21 if err != nil { 22 t.Error("failed to run passes:", err) 23 } 24 }) 25 }