use { crate::{term::*, dict::*, parser::*}, std::str::FromStr }; //<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>\\ #[test] fn test_curry() { assert_eq!( TypeTerm::from_str("").unwrap().curry(), TypeTerm::from_str("< C>").unwrap() ); assert_eq!( TypeTerm::from_str("").unwrap().curry(), TypeTerm::from_str("<< C> D>").unwrap() ); assert_eq!( TypeTerm::from_str("").unwrap().curry(), TypeTerm::from_str("<<<<<<<<< C> D> E> F> G> H> I> J> K>").unwrap() ); assert_eq!( TypeTerm::from_str("").unwrap().curry(), TypeTerm::from_str("< C>").unwrap() ); assert_eq!( TypeTerm::from_str(" ~ K").unwrap().curry(), TypeTerm::from_str("< C~Y~Z > ~ K").unwrap() ); } #[test] fn test_decurry() { assert_eq!( TypeTerm::from_str("< C>").unwrap().decurry(), TypeTerm::from_str("").unwrap() ); assert_eq!( TypeTerm::from_str("<< C> D>").unwrap().decurry(), TypeTerm::from_str("").unwrap(), ); assert_eq!( TypeTerm::from_str("<<<<<<<<< C> D> E> F> G> H> I> J> K>").unwrap().decurry(), TypeTerm::from_str("").unwrap() ); assert_eq!( TypeTerm::from_str("< C>").unwrap().decurry(), TypeTerm::from_str("").unwrap() ); assert_eq!( TypeTerm::from_str("< C~Y>~K").unwrap().decurry(), TypeTerm::from_str(" ~K").unwrap() ); } //<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>\\