Lines Matching +full:test +full:- +full:variants
3 //! enum variants.
21 /// Variants of this `Choice`.
22 variants: Vec<ChoiceVariant>, field
27 pub fn new(input: DeriveInput) -> syn::Result<Self> { in new()
44 let variants = data in new() localVariable
45 .variants in new()
53 variants, in new()
58 pub fn to_tokens(&self) -> TokenStream { in to_tokens()
83 for variant in &self.variants { in to_tokens()
93 fn can_decode(tag: ::der::Tag) -> bool { in to_tokens()
99 fn decode<R: ::der::Reader<#lifetime>>(reader: &mut R) -> ::der::Result<Self> { in to_tokens()
113 fn encode_value(&self, encoder: &mut impl ::der::Writer) -> ::der::Result<()> { in to_tokens()
119 fn value_len(&self) -> ::der::Result<::der::Length> { in to_tokens()
127 fn tag(&self) -> ::der::Tag { in to_tokens()
137 #[cfg(test)]
144 /// <https://tools.ietf.org/html/rfc5280#page-117>
151 #[test]
166 assert_eq!(ir.variants.len(), 2); in time_example()
168 let utc_time = &ir.variants[0]; in time_example()
175 let general_time = &ir.variants[1]; in time_example()
187 #[test]
206 assert_eq!(ir.variants.len(), 3); in implicit_example()
208 let bit_string = &ir.variants[0]; in implicit_example()
224 let time = &ir.variants[1]; in implicit_example()
237 let utf8_string = &ir.variants[2]; in implicit_example()