hugr_core/std_extensions/arithmetic/
mod.rs

1//! Basic arithmetic operations.
2
3pub mod conversions;
4pub mod float_ops;
5pub mod float_types;
6pub mod int_ops;
7pub mod int_types;
8
9#[cfg(test)]
10mod test {
11    use crate::{
12        std_extensions::arithmetic::int_types::{INT_TYPES, int_type},
13        types::type_param::TypeArg,
14    };
15
16    use super::int_types::LOG_WIDTH_BOUND;
17
18    #[test]
19    fn test_int_types() {
20        for i in 0..LOG_WIDTH_BOUND {
21            assert_eq!(
22                INT_TYPES[i as usize],
23                int_type(TypeArg::BoundedNat(u64::from(i)))
24            );
25        }
26    }
27}