Skip to content

Commit 4bdee1c

Browse files
committed
add more tests for icmp/fcmp bindings
1 parent a7eb4ae commit 4bdee1c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/all/test_instruction_values.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,12 @@ fn test_instructions() {
229229
assert_eq!(ptr_val.as_instruction().unwrap().get_opcode(), PtrToInt);
230230
assert_eq!(ptr.as_instruction().unwrap().get_opcode(), IntToPtr);
231231
assert_eq!(icmp.as_instruction().unwrap().get_opcode(), ICmp);
232+
assert_eq!(ptr.as_instruction().unwrap().get_icmp_predicate(), None);
232233
assert_eq!(icmp.as_instruction().unwrap().get_icmp_predicate().unwrap(), IntPredicate::EQ);
233234
assert_eq!(f32_sum.as_instruction().unwrap().get_opcode(), FAdd);
234235
assert_eq!(fcmp.as_instruction().unwrap().get_opcode(), FCmp);
236+
assert_eq!(f32_sum.as_instruction().unwrap().get_fcmp_predicate(), None);
237+
assert_eq!(icmp.as_instruction().unwrap().get_fcmp_predicate(), None);
235238
assert_eq!(fcmp.as_instruction().unwrap().get_fcmp_predicate().unwrap(), FloatPredicate::OEQ);
236239
assert_eq!(free_instruction.get_opcode(), Call);
237240
assert_eq!(return_instruction.get_opcode(), Return);

0 commit comments

Comments
 (0)