diff --git a/cli/src/config.rs b/cli/src/config.rs index 88ad9a4e..fe960e5c 100644 --- a/cli/src/config.rs +++ b/cli/src/config.rs @@ -29,9 +29,9 @@ pub struct ScalaParams { #[serde(default)] pub struct SwiftParams { pub prefix: String, - pub type_mappings: HashMap, pub default_decorators: Vec, pub default_generic_constraints: Vec, + pub type_mappings: HashMap, } #[derive(Default, Serialize, Deserialize, PartialEq, Eq, Debug)] @@ -122,6 +122,14 @@ mod test { [CURRENT_DIR, TEST_DIR, filename].iter().collect() } + #[test] + fn to_string_and_back() { + let path = config_file_path("mappings_config.toml"); + let config = load_config(Some(path)).unwrap(); + + toml::from_str::(&toml::to_string_pretty(&config).unwrap()).unwrap(); + } + #[test] fn default_test() { let path = config_file_path("default_config.toml");