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