fixing my mistake NOT <--> BYTE switch
This commit is contained in:
parent
a2b00ff8dd
commit
afc8dafab1
|
@ -60,10 +60,10 @@ public enum OpCode {
|
||||||
OR(0x17, 2),
|
OR(0x17, 2),
|
||||||
/** (0x18) Bitwise XOR operation */
|
/** (0x18) Bitwise XOR operation */
|
||||||
XOR(0x18, 2),
|
XOR(0x18, 2),
|
||||||
/** (0x19) Retrieve single byte from word */
|
/** (0x19) Bitwise NOT operationr */
|
||||||
BYTE(0x19, 2),
|
NOT(0x19, 1),
|
||||||
/** (0x1a) Bitwise NOT operationr */
|
/** (0x1a) Retrieve single byte from word */
|
||||||
NOT(0x1a, 1),
|
BYTE(0x1a, 2),
|
||||||
|
|
||||||
/* Cryptographic Operations */
|
/* Cryptographic Operations */
|
||||||
|
|
||||||
|
|
|
@ -614,7 +614,7 @@ public class VMTest {
|
||||||
public void testBYTE_1() {
|
public void testBYTE_1() {
|
||||||
|
|
||||||
VM vm = new VM();
|
VM vm = new VM();
|
||||||
program = new Program(Hex.decode("65AABBCCDDEEFF601E19"), invoke);
|
program = new Program(Hex.decode("65AABBCCDDEEFF601E1A"), invoke);
|
||||||
String expected = "00000000000000000000000000000000000000000000000000000000000000EE";
|
String expected = "00000000000000000000000000000000000000000000000000000000000000EE";
|
||||||
|
|
||||||
vm.step(program);
|
vm.step(program);
|
||||||
|
@ -628,7 +628,7 @@ public class VMTest {
|
||||||
public void testBYTE_2() {
|
public void testBYTE_2() {
|
||||||
|
|
||||||
VM vm = new VM();
|
VM vm = new VM();
|
||||||
program = new Program(Hex.decode("65AABBCCDDEEFF602019"), invoke);
|
program = new Program(Hex.decode("65AABBCCDDEEFF60201A"), invoke);
|
||||||
String expected = "0000000000000000000000000000000000000000000000000000000000000000";
|
String expected = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||||
|
|
||||||
vm.step(program);
|
vm.step(program);
|
||||||
|
@ -642,7 +642,7 @@ public class VMTest {
|
||||||
public void testBYTE_3() {
|
public void testBYTE_3() {
|
||||||
|
|
||||||
VM vm = new VM();
|
VM vm = new VM();
|
||||||
program = new Program(Hex.decode("65AABBCCDDEE3A601F19"), invoke);
|
program = new Program(Hex.decode("65AABBCCDDEE3A601F1A"), invoke);
|
||||||
String expected = "000000000000000000000000000000000000000000000000000000000000003A";
|
String expected = "000000000000000000000000000000000000000000000000000000000000003A";
|
||||||
|
|
||||||
vm.step(program);
|
vm.step(program);
|
||||||
|
@ -657,7 +657,7 @@ public class VMTest {
|
||||||
public void testBYTE_4() {
|
public void testBYTE_4() {
|
||||||
|
|
||||||
VM vm = new VM();
|
VM vm = new VM();
|
||||||
program = new Program(Hex.decode("65AABBCCDDEE3A19"), invoke);
|
program = new Program(Hex.decode("65AABBCCDDEE3A1A"), invoke);
|
||||||
try {
|
try {
|
||||||
vm.step(program);
|
vm.step(program);
|
||||||
vm.step(program);
|
vm.step(program);
|
||||||
|
@ -1005,7 +1005,7 @@ public class VMTest {
|
||||||
public void testNOT_1() {
|
public void testNOT_1() {
|
||||||
|
|
||||||
VM vm = new VM();
|
VM vm = new VM();
|
||||||
program = new Program(Hex.decode("60011a"), invoke);
|
program = new Program(Hex.decode("600119"), invoke);
|
||||||
String expected = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE";
|
String expected = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE";
|
||||||
|
|
||||||
vm.step(program);
|
vm.step(program);
|
||||||
|
@ -1018,7 +1018,7 @@ public class VMTest {
|
||||||
public void testNOT_2() {
|
public void testNOT_2() {
|
||||||
|
|
||||||
VM vm = new VM();
|
VM vm = new VM();
|
||||||
program = new Program(Hex.decode("61A0031a"), invoke);
|
program = new Program(Hex.decode("61A00319"), invoke);
|
||||||
String expected = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5FFC";
|
String expected = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5FFC";
|
||||||
|
|
||||||
vm.step(program);
|
vm.step(program);
|
||||||
|
@ -1031,7 +1031,7 @@ public class VMTest {
|
||||||
public void testNOT_3() {
|
public void testNOT_3() {
|
||||||
|
|
||||||
VM vm = new VM();
|
VM vm = new VM();
|
||||||
program = new Program(Hex.decode("6100001a"), invoke);
|
program = new Program(Hex.decode("61000019"), invoke);
|
||||||
String expected = "0000000000000000000000000000000000000000000000000000000000000000";
|
String expected = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||||
|
|
||||||
vm.step(program);
|
vm.step(program);
|
||||||
|
|
Loading…
Reference in New Issue