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

Function test_nested_struct

src/ser.rs:778–799  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

776
777 #[test]
778 fn test_nested_struct() {
779 #[derive(Serialize)]
780 struct Foo {
781 name: String,
782 bar: Bar,
783 }
784
785 #[derive(Serialize)]
786 struct Bar {
787 name: String,
788 }
789
790 test_ser(
791 Foo {
792 name: "foo".to_string(),
793 bar: Bar {
794 name: "bar".to_string(),
795 },
796 },
797 r#"{"name":"foo","bar":{"name":"bar"}}"#,
798 )
799 }
800
801 #[test]
802 fn test_tuple_struct() {

Callers

nothing calls this directly

Calls 1

test_serFunction · 0.85

Tested by

no test coverage detected