@@ -181,14 +181,14 @@ static int test_string(void)
181181
182182static int test_bytes (void )
183183{
184- char bytes [] = { 0xDE , 0xAD , 0xBE , 0xEF };
184+ char bytes [] = { 0xDE , 0xAD , 0x00 , 0xBE , 0xEF };
185185 avro_schema_t writer_schema = avro_schema_bytes ();
186186 avro_datum_t datum ;
187187 avro_datum_t expected_datum ;
188188
189189 datum = avro_givebytes (bytes , sizeof (bytes ), NULL );
190190 write_read_check (writer_schema , datum , NULL , NULL , "bytes" );
191- test_json (datum , "\"\\u00de\\u00ad\\u00be\\u00ef\"" );
191+ test_json (datum , "\"\\u00de\\u00ad\\u0000\\ u00be\\u00ef\"" );
192192 avro_datum_decref (datum );
193193 avro_schema_decref (writer_schema );
194194
@@ -613,14 +613,14 @@ static int test_union(void)
613613
614614static int test_fixed (void )
615615{
616- char bytes [] = { 0xD , 0xA , 0xD , 0xA , 0xB , 0xA , 0xB , 0xA };
616+ char bytes [] = { 0xD , 0xA , 0xD , 0xA , 0xB , 0x0 , 0xB , 0xA };
617617 avro_schema_t schema = avro_schema_fixed ("msg" , sizeof (bytes ));
618618 avro_datum_t datum ;
619619 avro_datum_t expected_datum ;
620620
621621 datum = avro_givefixed (schema , bytes , sizeof (bytes ), NULL );
622622 write_read_check (schema , datum , NULL , NULL , "fixed" );
623- test_json (datum , "\"\\r\\n\\r\\n\\u000b\\n \\u000b\\n\"" );
623+ test_json (datum , "\"\\r\\n\\r\\n\\u000b\\u0000 \\u000b\\n\"" );
624624 avro_datum_decref (datum );
625625
626626 datum = avro_givefixed (schema , NULL , sizeof (bytes ), NULL );
0 commit comments