File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,28 @@ TEST(Writer, InvalidEventSequence) {
442
442
EXPECT_THROW (writer.Int (1 ), AssertException);
443
443
EXPECT_FALSE (writer.IsComplete ());
444
444
}
445
+
446
+ // { 'a' }
447
+ {
448
+ StringBuffer buffer;
449
+ Writer<StringBuffer> writer (buffer);
450
+ writer.StartObject ();
451
+ writer.Key (" a" );
452
+ EXPECT_THROW (writer.EndObject (), AssertException);
453
+ EXPECT_FALSE (writer.IsComplete ());
454
+ }
455
+
456
+ // { 'a':'b','c' }
457
+ {
458
+ StringBuffer buffer;
459
+ Writer<StringBuffer> writer (buffer);
460
+ writer.StartObject ();
461
+ writer.Key (" a" );
462
+ writer.String (" b" );
463
+ writer.Key (" c" );
464
+ EXPECT_THROW (writer.EndObject (), AssertException);
465
+ EXPECT_FALSE (writer.IsComplete ());
466
+ }
445
467
}
446
468
447
469
TEST (Writer, NaN) {
You can’t perform that action at this time.
0 commit comments