diff --git a/prost-reflect-tests/src/json.rs b/prost-reflect-tests/src/json.rs index 9350ba71..68cdc0c5 100644 --- a/prost-reflect-tests/src/json.rs +++ b/prost-reflect-tests/src/json.rs @@ -13,8 +13,7 @@ use serde_json::json; use crate::{ arbitrary, proto::{ - contains_group, message_with_oneof, ComplexType, ContainsGroup, MessageWithAliasedEnum, - MessageWithOneof, Point, ScalarArrays, Scalars, WellKnownTypes, + contains_group, message_with_oneof, options::Aggregate, ComplexType, ContainsGroup, MessageWithAliasedEnum, MessageWithOneof, Point, ScalarArrays, Scalars, WellKnownTypes }, test_file_descriptor, }; @@ -884,6 +883,19 @@ fn serialize_any_wkt() { ); } +#[test] +fn serialize_options() { + let json = to_json( + Aggregate::default().descriptor().descriptor_proto() + ); + let options = json.get("options").unwrap(); + // Aggregate message descriptor should have some options + assert_ne!( + options.as_object().unwrap().len(), + 0 + ); +} + #[test] fn deserialize_any() { let value: prost_types::Any = from_json(