github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/engine/wazevo/ssa/instructions_test.go (about)

     1  package ssa
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/wasilibs/wazerox/internal/testing/require"
     7  )
     8  
     9  func TestInstruction_InvertConditionalBrx(t *testing.T) {
    10  	i := &Instruction{opcode: OpcodeBrnz}
    11  	i.InvertBrx()
    12  	require.Equal(t, OpcodeBrz, i.opcode)
    13  	i.InvertBrx()
    14  	require.Equal(t, OpcodeBrnz, i.opcode)
    15  }