use serde::Serialize; use serde_spaniel::*; use std::iter::empty; use super::golden::{self, Golden}; use super::mock::MockPrompt; fn test_ser() where G::V: Serialize, { let mut prompt = MockPrompt::new(empty()); to_bare_prompt(&G::value(), &mut prompt).unwrap(); assert_eq!(prompt.responses(), G::responses(true)); assert_eq!(prompt.scope_names(), G::scope_names()) } #[test] fn struct_of_prims() { test_ser::() } #[test] fn struct_of_seqs() { test_ser::() } #[test] fn tuple_of_options() { test_ser::() } #[test] fn tuple_of_units() { test_ser::() } #[test] fn seq_of_seqs() { test_ser::() } #[test] fn map_of_enums_and_newtypes() { test_ser::() } #[test] fn bytes() { test_ser::() }