Skip to content

Commit

Permalink
WIP First running test - fails with stack overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
acl-cqc committed Dec 23, 2024
1 parent 86df78d commit f7730f2
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions hugr-core/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,17 +751,17 @@ pub(crate) mod test {
use std::{iter::once, sync::Arc};

use crate::extension::{ExtensionRegistry, ExtensionSet};
use crate::std_extensions::std_reg;
use crate::types::{
type_param::TypeParam, FuncValueType, Type, TypeArg, TypeBound, TypeRow,
};
use itertools::Itertools;
use proptest::sample::Index;
use proptest::string::string_regex;
use proptest::{
collection::vec,
prelude::{any, Just, Strategy},
prop_oneof,
sample::select,
prop_assert, prop_oneof, proptest,
sample::{select, Index},
string::string_regex,
};

trait VarEnvState<T>: Send + Sync {
Expand Down Expand Up @@ -1068,5 +1068,13 @@ pub(crate) mod test {
})
}
}

proptest! {
#[test]
fn test_type_valid(t_with_env in MakeType(TypeBound::Any).with_env(vec![], Arc::new(std_reg()))) {
let (t,env) = t_with_env;
prop_assert!(t.validate(&env).is_ok());
}
}
}
}

0 comments on commit f7730f2

Please sign in to comment.