// Path: src/main/java/fr/broeglin/jmmix/simulator/Processor.java
// public static final long V_BIT = (1 << 6); // 0x40


import static fr.broeglin.jmmix.simulator.Processor.V_BIT;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;
		proc.setRegister(2, 0b1111_1111_1111_1111l);
		proc.setRegister(3, 0x3l);

		ShiftInstructions.SLU(proc, mem, 0x01, 0x02, 0x03);

		assertThat(proc.register(1), equalTo(0b111_1111_1111_1111_1000l));
		assertThat(proc.rA(V_BIT), is(false));
	}

	@Test
	public void should_SLU_with_overflow() {
		proc.setRegister(1, 0x12345678);
		proc.setRegister(2, 0xBFFF_FFFF_FFFF_FFFFl);
		proc.setRegister(3, 0x3l);

		ShiftInstructions.SLU(proc, mem, 0x01, 0x02, 0x03);

		assertThat(proc.register(1), equalTo(0xFFFF_FFFF_FFFF_FFF8l));
		// does not cause overflow
		assertThat(proc.rA(V_BIT), is(false));
	}

	@Test
	public void should_SLUI() {
		proc.setRegister(1, 0x12345678);
		proc.setRegister(2, 0b1111_1111_1111_1111l);

		ShiftInstructions.SLUI(proc, mem, 0x01, 0x02, 0x03);

		assertThat(proc.register(1), equalTo(0b111_1111_1111_1111_1000l));
// Path: src/main/java/fr/broeglin/jmmix/simulator/Processor.java
// public static final long V_BIT = (1 << 6); // 0x40


// Path: src/test/java/fr/broeglin/jmmix/simulator/instructions/ShiftInstructionsTest.java
import static fr.broeglin.jmmix.simulator.Processor.V_BIT;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;

		proc.setRegister(2, 0b1111_1111_1111_1111l);
		proc.setRegister(3, 0x3l);

		ShiftInstructions.SLU(proc, mem, 0x01, 0x02, 0x03);

		assertThat(proc.register(1), equalTo(0b111_1111_1111_1111_1000l));
		assertThat(proc.rA(V_BIT), is(false));
	}

	@Test
	public void should_SLU_with_overflow() {
		proc.setRegister(1, 0x12345678);
		proc.setRegister(2, 0xBFFF_FFFF_FFFF_FFFFl);
		proc.setRegister(3, 0x3l);

		ShiftInstructions.SLU(proc, mem, 0x01, 0x02, 0x03);

		assertThat(proc.register(1), equalTo(0xFFFF_FFFF_FFFF_FFF8l));
		// does not cause overflow
		assertThat(proc.rA(V_BIT), is(false));
	}

	@Test
	public void should_SLUI() {
		proc.setRegister(1, 0x12345678);
		proc.setRegister(2, 0b1111_1111_1111_1111l);

		ShiftInstructions.SLUI(proc, mem, 0x01, 0x02, 0x03);

		assertThat(proc.register(1), equalTo(0b111_1111_1111_1111_1000l));
		assertThat(proc.rA(V_BIT), is(false));