Fixing dup_position test

This commit is contained in:
Tomusdrw 2016-01-14 00:43:54 +01:00
parent d06857737e
commit c357631bbb

View File

@ -25,9 +25,9 @@ pub fn get_dup_position (i: Instruction) -> usize {
#[test] #[test]
fn test_get_dup_position() { fn test_get_dup_position() {
assert_eq!(get_dup_position(DUP1), 1); assert_eq!(get_dup_position(DUP1), 0);
assert_eq!(get_dup_position(DUP5), 5); assert_eq!(get_dup_position(DUP5), 4);
assert_eq!(get_dup_position(DUP10), 10); assert_eq!(get_dup_position(DUP10), 9);
} }
pub fn get_swap_position (i : Instruction) -> usize { pub fn get_swap_position (i : Instruction) -> usize {