@@ -126,6 +126,77 @@ fn parameter_status() -> Result<(), Box<dyn Error>> {
126126 Ok ( ( ) )
127127}
128128
129+ #[ test]
130+ fn command_complete1 ( ) -> Result < ( ) , Box < dyn Error > > {
131+ encoding_eq ! (
132+ ServerMessage :: CommandComplete1 ( CommandComplete1 {
133+ annotations: HashMap :: new( ) ,
134+ capabilities: Capabilities :: MODIFICATIONS ,
135+ status: "okay" . to_string( ) ,
136+ state: None ,
137+ } ) ,
138+ b"C\0 \0 \0 *\0 \0 \0 \0 \0 \0 \0 \0 \0 \x01 \0 \0 \0 \x04 okay\
139+ \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \
140+ \0 \0 \0 \0 "
141+ ) ;
142+ Ok ( ( ) )
143+ }
144+
145+ #[ test]
146+ fn command_data_description2 ( ) -> Result < ( ) , Box < dyn Error > > {
147+ encoding_eq_ver ! (
148+ 2 ,
149+ 0 ,
150+ ServerMessage :: CommandDataDescription1 ( CommandDataDescription1 {
151+ annotations: HashMap :: new( ) ,
152+ capabilities: Capabilities :: MODIFICATIONS ,
153+ result_cardinality: Cardinality :: AtMostOne ,
154+ input: RawTypedesc {
155+ proto: ProtocolVersion :: new( 2 , 0 ) ,
156+ id: Uuid :: from_u128( 0xFF ) ,
157+ data: Bytes :: from_static( b"\x04 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \xff \0 \0 " ) ,
158+ } ,
159+ output: RawTypedesc {
160+ proto: ProtocolVersion :: new( 2 , 0 ) ,
161+ id: Uuid :: from_u128( 0x105 ) ,
162+ data: Bytes :: from_static( b"\x02 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \x01 \x05 " ) ,
163+ } ,
164+ } ) ,
165+ bconcat!( b"T\0 \0 \0 [\0 \0 \0 \0 \0 \0 \0 \0 \0 \x01 o"
166+ b"\0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \xff "
167+ b"\0 \0 \0 \x13 "
168+ b"\x04 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \xff \0 "
169+ b"\0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \x01 \x05 "
170+ b"\0 \0 \0 \x11 "
171+ b"\x02 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \x01 \x05 " )
172+ ) ;
173+ encoding_eq_ver ! (
174+ 2 ,
175+ 0 ,
176+ ServerMessage :: CommandDataDescription1 ( CommandDataDescription1 {
177+ annotations: HashMap :: new( ) ,
178+ capabilities: Capabilities :: MODIFICATIONS ,
179+ result_cardinality: Cardinality :: NoResult ,
180+ input: RawTypedesc {
181+ proto: ProtocolVersion :: new( 2 , 0 ) ,
182+ id: Uuid :: from_u128( 0xFF ) ,
183+ data: Bytes :: from_static( b"\x04 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \xff \0 \0 " ) ,
184+ } ,
185+ output: RawTypedesc {
186+ proto: ProtocolVersion :: new( 2 , 0 ) ,
187+ id: Uuid :: from_u128( 0 ) ,
188+ data: Bytes :: from_static( b"" ) ,
189+ } ,
190+ } ) ,
191+ bconcat!( b"T\0 \0 \0 J\0 \0 \0 \0 \0 \0 \0 \0 \0 \x01 n"
192+ b"\0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \xff "
193+ b"\0 \0 \0 \x13 "
194+ b"\x04 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \xff \0 "
195+ b"\0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 " )
196+ ) ;
197+ Ok ( ( ) )
198+ }
199+
129200#[ test]
130201fn data ( ) -> Result < ( ) , Box < dyn Error > > {
131202 encoding_eq ! (
0 commit comments