Skip to content

Commit

Permalink
Remove unused test setup changes
Browse files Browse the repository at this point in the history
  • Loading branch information
acl-cqc committed Apr 15, 2024
1 parent 98c75a2 commit b918bee
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions hugr/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,16 +504,10 @@ pub(crate) fn check_typevar_decl(
#[cfg(test)]
pub(crate) mod test {
use super::*;
use crate::extension::PRELUDE;
use crate::{const_extension_ids, Extension};
use crate::{extension::prelude::USIZE_T, ops::AliasDecl};

use crate::types::TypeBound;

const_extension_ids! {
const MY_EXT: ExtensionId = "my_extension";
}

#[test]
fn construct() {
let t: Type = Type::new_tuple(vec![
Expand All @@ -522,7 +516,7 @@ pub(crate) mod test {
Type::new_extension(CustomType::new(
"my_custom",
[],
MY_EXT,
"my_extension".try_into().unwrap(),
TypeBound::Copyable,
)),
Type::new_alias(AliasDecl::new("my_alias", TypeBound::Eq)),
Expand All @@ -531,17 +525,6 @@ pub(crate) mod test {
&t.to_string(),
"[usize, Function([[]][]), my_custom, Alias(my_alias)]"
);

let mut ext = Extension::new(MY_EXT);
ext.add_type(
"my_custom".into(),
vec![],
"".into(),
TypeBound::Copyable.into(),
)
.unwrap();
let reg = ExtensionRegistry::try_new([PRELUDE.to_owned(), ext]).unwrap();
t.validate(&reg, &[]).unwrap()
}

#[test]
Expand Down

0 comments on commit b918bee

Please sign in to comment.