github.com/bananabytelabs/wazero@v0.0.0-20240105073314-54b22a776da8/internal/engine/compiler/arch_arm64_test.go (about) 1 package compiler 2 3 import ( 4 "testing" 5 "unsafe" 6 7 "github.com/bananabytelabs/wazero/internal/testing/require" 8 ) 9 10 func TestArchContextOffsetInArm64Engine(t *testing.T) { 11 var ctx callEngine 12 require.Equal(t, int(unsafe.Offsetof(ctx.compilerCallReturnAddress)), arm64CallEngineArchContextCompilerCallReturnAddressOffset, "fix consts in compiler_arm64.s") 13 require.Equal(t, int(unsafe.Offsetof(ctx.minimum32BitSignedInt)), arm64CallEngineArchContextMinimum32BitSignedIntOffset) 14 require.Equal(t, int(unsafe.Offsetof(ctx.minimum64BitSignedInt)), arm64CallEngineArchContextMinimum64BitSignedIntOffset) 15 }