Skip to content

Commit

Permalink
assert string
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 committed Nov 30, 2023
1 parent 468e907 commit df3995a
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/std_extensions/arithmetic/int_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,13 @@ mod test {
.signature(),
FunctionType::new(vec![int_type(ta(3))], vec![int_type(ta(4))],)
);
assert!(IntOpDef::iwiden_u
.with_two_widths(4, 3)
.to_extension_op()
.is_none());
assert!(
IntOpDef::iwiden_u
.with_two_widths(4, 3)
.to_extension_op()
.is_none(),
"type arguments invalid"
);

assert_eq!(
IntOpDef::inarrow_s
Expand All @@ -380,10 +383,13 @@ mod test {
#[test]
fn test_conversions() {
let o = IntOpDef::itobool.with_width(5);
assert!(IntOpDef::itobool
.with_two_widths(1, 2)
.to_extension_op()
.is_none());
assert!(
IntOpDef::itobool
.with_two_widths(1, 2)
.to_extension_op()
.is_none(),
"type arguments invalid"
);
let ext_op = o.clone().to_extension_op().unwrap();

assert_eq!(IntOpType::from_extension_op(&ext_op).unwrap(), o);
Expand Down

0 comments on commit df3995a

Please sign in to comment.