MCPcopy Create free account
hub / github.com/davidhewitt/pythonize / test_enum_struct_variant

Function test_enum_struct_variant

src/ser.rs:855–868  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

853
854 #[test]
855 fn test_enum_struct_variant() {
856 #[derive(Serialize)]
857 enum E {
858 Struct { foo: String, bar: usize },
859 }
860
861 test_ser(
862 E::Struct {
863 foo: "foo".to_string(),
864 bar: 5,
865 },
866 r#"{"Struct":{"foo":"foo","bar":5}}"#,
867 );
868 }
869
870 #[test]
871 fn test_integers() {

Callers

nothing calls this directly

Calls 1

test_serFunction · 0.85

Tested by

no test coverage detected