From 58c8626219b066cd4b5f43b0d17e3c8dc520679e Mon Sep 17 00:00:00 2001 From: Jonathan Balls Date: Wed, 11 Sep 2024 14:03:44 +0100 Subject: [PATCH] fix tests --- src/instructions/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/instructions/mod.rs b/src/instructions/mod.rs index a813809..0e866d7 100644 --- a/src/instructions/mod.rs +++ b/src/instructions/mod.rs @@ -327,7 +327,7 @@ mod test { use super::parse; fn assert_instruction(opcode: u8, imm8: u8, json: &Value) { - let expected_bytes = json["bytes"].as_u64().unwrap() as u8; + let expected_bytes = json["bytes"].as_u64().unwrap() as u16; let expected_cycles = json["cycles"][0].as_u64().unwrap() as u8; // Call the parse function (you need to implement this) @@ -561,7 +561,7 @@ mod test { fn jr_imm8() { assert!(matches!( get_instruction(0x18, 0xFF, 0x0), - Instruction::JrImm8(0xFF) + Instruction::JrImm8(-1) )) }