Skip to content

Commit

Permalink
Fix test_module ExtensionSet
Browse files Browse the repository at this point in the history
  • Loading branch information
acl-cqc committed Feb 3, 2025
1 parent b264604 commit 9d289f6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hugr-passes/src/const_fold/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::collections::HashSet;

use hugr_core::ops::handle::NodeHandle;
use hugr_core::ops::Const;
use hugr_core::std_extensions::arithmetic::{int_ops, int_types};
use itertools::Itertools;
use lazy_static::lazy_static;
use rstest::rstest;
Expand Down Expand Up @@ -1586,7 +1587,12 @@ fn test_cfg(
#[test]
fn test_module() -> Result<(), Box<dyn std::error::Error>> {
let mut mb = ModuleBuilder::new();
let mut main = mb.define_function("main", Signature::new_endo(INT_TYPES[5].clone()))?;
let mut main = mb.define_function(
"main",
Signature::new_endo(INT_TYPES[5].clone())
.with_extension_delta(int_types::EXTENSION_ID)
.with_extension_delta(int_ops::EXTENSION_ID),
)?;
let c7 = main.add_load_value(ConstInt::new_u(5, 7)?);
let c17 = main.add_load_value(ConstInt::new_u(5, 17)?);
let res = main.add_dataflow_op(IntOpDef::iadd.with_log_width(5), [c7, c17])?;
Expand Down

0 comments on commit 9d289f6

Please sign in to comment.