use super :: *;
use the_module ::qt;
#[ test ]
fn type_container_kind_basic()
{
use the_module ::exposed ::container_kind;
let code = qt!(core ::option ::Option< i32 >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::No);
let code = qt!(core ::option ::Option< Vec >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::No);
let code = qt!(alloc ::vec ::Vec< i32 >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::Vector);
let code = qt!(alloc ::vec ::Vec);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::Vector);
let code = qt!(std ::vec ::Vec< i32 >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::Vector);
let code = qt!(std ::vec ::Vec);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::Vector);
let code = qt!(std ::Vec< i32 >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::Vector);
let code = qt!(std ::Vec);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::Vector);
let code = qt!( std ::SomeVector< i32, i32 > );
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::No);
let code = qt!( std ::collections ::HashMap< i32, i32 > );
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::HashMap);
let code = qt!(std ::collections ::HashSet< i32 >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = container_kind ::of_type(&tree_type);
assert_eq!(got, the_module ::container_kind ::ContainerKind ::HashSet);
}
#[ test ]
fn type_optional_container_kind_basic()
{
let code = qt!(i32);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::No, false));
let code = qt!(core ::option ::Option< i32 >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::No, true));
let code = qt!(Option< i32 >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::No, true));
let code = qt!(core ::option ::Option< Vec >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::Vector, true));
let code = qt!(Option< Vec >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::Vector, true));
let code = qt!(std ::Vec< i32 >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::Vector, false));
let code = qt!(core ::option ::Option< std ::collections ::HashMap< i32, i32 >>);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::HashMap, true));
let code = qt!(Option< HashMap >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::HashMap, true));
let code = qt!( HashMap< i32, i32 > );
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::HashMap, false));
let code = qt!(core ::option ::Option< std ::collections ::HashSet< i32, i32 >>);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::HashSet, true));
let code = qt!(Option< HashSet >);
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::HashSet, true));
let code = qt!( HashSet< i32, i32 > );
let tree_type = syn ::parse2 :: < syn ::Type >(code).unwrap();
let got = the_module ::container_kind ::of_optional(&tree_type);
assert_eq!(got, (the_module ::container_kind ::ContainerKind ::HashSet, false));
}