File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed
Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ namespace tao
126126 " 2390026549819838548794829220689472168983109969836584681402285424333066033985088644580400103493397042"
127127 " 7567186443383770486037861622771738545623065874679014086723327636718751234567890123456789012345678901"
128128 " e-308" , 2.2250738585072014e-308 );
129- }
129+
130+ TEST_THROWS ( from_string ( " 1.0e1234567890" ) );
131+ }
130132
131133 } // json
132134
Original file line number Diff line number Diff line change @@ -67,10 +67,10 @@ namespace tao
6767 TEST_ASSERT ( from_string ( " true" ) == value ( true ) );
6868 TEST_ASSERT ( from_string ( " false" ) == value ( false ) );
6969
70+ // TODO: test_int64()
71+ // TODO: test_string()
7072 test_array ();
7173 test_object ();
72-
73- // More elaborate tests are performed by the "nativejson benchmarks".
7474 }
7575
7676 } // json
Original file line number Diff line number Diff line change @@ -11,16 +11,16 @@ namespace tao
1111 {
1212 TEST_ASSERT ( sizeof ( type ) == 1 );
1313
14- TEST_ASSERT ( to_string ( type::NULL_ ) == " null" );
15- TEST_ASSERT ( to_string ( type::BOOL_ ) == " bool" );
16- TEST_ASSERT ( to_string ( type::INT64 ) == " int64" );
17- TEST_ASSERT ( to_string ( type::DOUBLE ) == " double" );
14+ TEST_ASSERT ( to_string ( type::NULL_ ) == std::string ( " null" ) );
15+ TEST_ASSERT ( to_string ( type::BOOL_ ) == std::string ( " bool" ) );
16+ TEST_ASSERT ( to_string ( type::INT64 ) == std::string ( " int64" ) );
17+ TEST_ASSERT ( to_string ( type::DOUBLE ) == std::string ( " double" ) );
1818
19- TEST_ASSERT ( to_string ( type::STRING ) == " string" );
20- TEST_ASSERT ( to_string ( type::ARRAY ) == " array" );
21- TEST_ASSERT ( to_string ( type::OBJECT ) == " object" );
19+ TEST_ASSERT ( to_string ( type::STRING ) == std::string ( " string" ) );
20+ TEST_ASSERT ( to_string ( type::ARRAY ) == std::string ( " array" ) );
21+ TEST_ASSERT ( to_string ( type::OBJECT ) == std::string ( " object" ) );
2222
23- TEST_ASSERT ( to_string ( type ( 42 ) ) == " unknown" );
23+ TEST_ASSERT ( to_string ( type ( 42 ) ) == std::string ( " unknown" ) );
2424
2525 TEST_ASSERT ( needs_destroy ( type::NULL_ ) == false );
2626 TEST_ASSERT ( needs_destroy ( type::BOOL_ ) == false );
You can’t perform that action at this time.
0 commit comments