
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.
19 строки
371 Б
Go
19 строки
371 Б
Go
package transform_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/tinygo-org/tinygo/transform"
|
|
"tinygo.org/x/go-llvm"
|
|
)
|
|
|
|
func TestWasmABI(t *testing.T) {
|
|
t.Parallel()
|
|
testTransform(t, "testdata/wasm-abi", func(mod llvm.Module) {
|
|
// Run ABI change pass.
|
|
err := transform.ExternalInt64AsPtr(mod)
|
|
if err != nil {
|
|
t.Errorf("failed to change wasm ABI: %v", err)
|
|
}
|
|
})
|
|
}
|