Skip to content

Commit d9cceb9

Browse files
committed
Small changes.
1 parent 5f7c7b2 commit d9cceb9

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/test/json/double.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

src/test/json/parse.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

src/test/json/type.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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 );

0 commit comments

Comments
 (0)