i128: i128::from(i64::MIN), /* To make deserialization strings consistent and compatible across feature flags */
u128: u128::from(u64::MAX), /* To make deserialization strings consistent and compatible across feature flags */
i128: i128::from(i64::MAX), /* To make deserialization strings consistent and compatible across feature flags */
fn roundtrip<T: Debug + Serialize + for<'de> Deserialize<'de> + PartialEq>(value: &T, check: &str) {
roundtrip(&StructOfEverything::default(), "StructOfEverything{str:\"\",bytes:b\"\",char:'\\0',u8:0,u16:0,u32:0,u64:0,u128:0,usize:0,i8:0,i16:0,i32:0,i64:0,i128:0,isize:0,bool:false}");
roundtrip(&StructOfEverything::min(), "StructOfEverything{str:\"\\0\",bytes:b\"\\0\",char:'\\0',u8:0,u16:0,u32:0,u64:0,u128:0,usize:0,i8:-128,i16:-32768,i32:-2147483648,i64:-9223372036854775808,i128:-9223372036854775808,isize:-9223372036854775808,bool:false}");
roundtrip(&StructOfEverything::max(), "StructOfEverything{str:\"hello 🦀\",bytes:b\"hello, world\",char:'🦀',u8:255,u16:65535,u32:4294967295,u64:18446744073709551615,u128:18446744073709551615,usize:18446744073709551615,i8:127,i16:32767,i32:2147483647,i64:9223372036854775807,i128:9223372036854775807,isize:9223372036854775807,bool:true}");
roundtrip_pretty(&StructOfEverything::default(), "StructOfEverything {\n str: \"\",\n bytes: b\"\",\n char: '\\0',\n u8: 0,\n u16: 0,\n u32: 0,\n u64: 0,\n u128: 0,\n usize: 0,\n i8: 0,\n i16: 0,\n i32: 0,\n i64: 0,\n i128: 0,\n isize: 0,\n bool: false\n}");
roundtrip_pretty(&StructOfEverything::min(), "StructOfEverything {\n str: \"\\0\",\n bytes: b\"\\0\",\n char: '\\0',\n u8: 0,\n u16: 0,\n u32: 0,\n u64: 0,\n u128: 0,\n usize: 0,\n i8: -128,\n i16: -32768,\n i32: -2147483648,\n i64: -9223372036854775808,\n i128: -9223372036854775808,\n isize: -9223372036854775808,\n bool: false\n}");
roundtrip_pretty(&StructOfEverything::max(), "StructOfEverything {\n str: \"hello 🦀\",\n bytes: b\"hello, world\",\n char: '🦀',\n u8: 255,\n u16: 65535,\n u32: 4294967295,\n u64: 18446744073709551615,\n u128: 18446744073709551615,\n usize: 18446744073709551615,\n i8: 127,\n i16: 32767,\n i32: 2147483647,\n i64: 9223372036854775807,\n i128: 9223372036854775807,\n isize: 9223372036854775807,\n bool: true\n}");
roundtrip_implicit_map(&StructOfEverything::default(), "str: \"\"\nbytes: b\"\"\nchar: '\\0'\nu8: 0\nu16: 0\nu32: 0\nu64: 0\nu128: 0\nusize: 0\ni8: 0\ni16: 0\ni32: 0\ni64: 0\ni128: 0\nisize: 0\nbool: false\n");
roundtrip_implicit_map(&StructOfEverything::min(), "str: \"\\0\"\nbytes: b\"\\0\"\nchar: '\\0'\nu8: 0\nu16: 0\nu32: 0\nu64: 0\nu128: 0\nusize: 0\ni8: -128\ni16: -32768\ni32: -2147483648\ni64: -9223372036854775808\ni128: -9223372036854775808\nisize: -9223372036854775808\nbool: false\n");
roundtrip_implicit_map(&StructOfEverything::max(), "str: \"hello 🦀\"\nbytes: b\"hello, world\"\nchar: '🦀'\nu8: 255\nu16: 65535\nu32: 4294967295\nu64: 18446744073709551615\nu128: 18446744073709551615\nusize: 18446744073709551615\ni8: 127\ni16: 32767\ni32: 2147483647\ni64: 9223372036854775807\ni128: 9223372036854775807\nisize: 9223372036854775807\nbool: true\n");
roundtrip_anonymous_structs(&StructOfEverything::default(), "{str:\"\",bytes:b\"\",char:'\\0',u8:0,u16:0,u32:0,u64:0,u128:0,usize:0,i8:0,i16:0,i32:0,i64:0,i128:0,isize:0,bool:false}");
roundtrip_anonymous_structs(&StructOfEverything::min(), "{str:\"\\0\",bytes:b\"\\0\",char:'\\0',u8:0,u16:0,u32:0,u64:0,u128:0,usize:0,i8:-128,i16:-32768,i32:-2147483648,i64:-9223372036854775808,i128:-9223372036854775808,isize:-9223372036854775808,bool:false}");
roundtrip_anonymous_structs(&StructOfEverything::max(), "{str:\"hello 🦀\",bytes:b\"hello, world\",char:'🦀',u8:255,u16:65535,u32:4294967295,u64:18446744073709551615,u128:18446744073709551615,usize:18446744073709551615,i8:127,i16:32767,i32:2147483647,i64:9223372036854775807,i128:9223372036854775807,isize:9223372036854775807,bool:true}");