File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,17 @@ fn test_instructions() {
53
53
assert_eq ! ( ptr. as_instruction( ) . unwrap( ) . get_opcode( ) , IntToPtr ) ;
54
54
assert_eq ! ( free_instruction. get_opcode( ) , Call ) ;
55
55
assert_eq ! ( return_instruction. get_opcode( ) , Return ) ;
56
+
57
+ // test instruction cloning
58
+ let instruction_clone = return_instruction. clone ( ) ;
59
+
60
+ assert_eq ! ( instruction_clone. get_opcode( ) , return_instruction. get_opcode( ) ) ;
61
+ assert_ne ! ( instruction_clone, return_instruction) ;
62
+
63
+ // test copying
64
+ let instruction_clone_copy = instruction_clone;
65
+
66
+ assert_eq ! ( instruction_clone, instruction_clone_copy) ;
56
67
}
57
68
58
69
#[ test]
@@ -693,4 +704,4 @@ fn test_value_copies() {
693
704
let i8_value_copy = i8_value;
694
705
695
706
assert_eq ! ( i8_value, i8_value_copy) ;
696
- }
707
+ }
You can’t perform that action at this time.
0 commit comments