File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,16 @@ namespace tao
257257 test_double ( 0.0 );
258258 test_double ( 42.0 );
259259
260+ value v;
261+
262+ const double a = std::numeric_limits< double >::infinity ();
263+ const double b = std::numeric_limits< double >::quiet_NaN ();
264+ const double c = std::numeric_limits< double >::signaling_NaN ();
265+
266+ TEST_THROWS ( v = a );
267+ TEST_THROWS ( v = b );
268+ TEST_THROWS ( v = c );
269+
260270 test_string ( " " );
261271 test_string ( " foo" );
262272 test_string ( " abcdefghijklmnpqrstuvwxyz" );
Original file line number Diff line number Diff line change @@ -80,6 +80,19 @@ namespace tao
8080 // TODO: test_int64()
8181 test_array ();
8282 test_object ();
83+
84+ TEST_THROWS ( from_string ( " " ) );
85+ TEST_THROWS ( from_string ( " [" ) );
86+ TEST_THROWS ( from_string ( " {" ) );
87+ TEST_THROWS ( from_string ( " ]" ) );
88+ TEST_THROWS ( from_string ( " }" ) );
89+ TEST_THROWS ( from_string ( " '" ) );
90+ TEST_THROWS ( from_string ( " \" " ) );
91+ TEST_THROWS ( from_string ( " ..." ) );
92+ TEST_THROWS ( from_string ( " \"\xfd\xbf\xbf\xbf\xbf " ) );
93+ TEST_THROWS ( from_string ( " \"\xfd\xbf\xbf\xbf\xbf\" " ) );
94+ TEST_THROWS ( from_string ( " \"\xfd\xbf\xbf\xbf\xbf\xbf " ) );
95+ TEST_THROWS ( from_string ( " \"\xfd\xbf\xbf\xbf\xbf\xbf\" " ) );
8396 }
8497
8598 } // json
You can’t perform that action at this time.
0 commit comments