File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,9 +206,8 @@ namespace osmium {
206206 *data = s;
207207 }
208208
209- // Arbitrary limit how long integers can get
210209 enum {
211- max_int_len = 16
210+ max_int_len = std::numeric_limits< int64_t >::digits10 + 1
212211 };
213212
214213 template <typename T>
Original file line number Diff line number Diff line change @@ -260,6 +260,8 @@ TEST_CASE("Parse OPL: integer") {
260260 REQUIRE (test_parse_int (" -1x" ) == -1 );
261261 REQUIRE (test_parse_int (" 1234567890123x" ) == 1234567890123 );
262262 REQUIRE (test_parse_int (" -1234567890123x" ) == -1234567890123 );
263+ REQUIRE (test_parse_int (" 999999999999999999x" ) == 999999999999999999 );
264+ REQUIRE (test_parse_int (" -999999999999999999x" ) == -999999999999999999 );
263265
264266 REQUIRE_THROWS_WITH (test_parse_int (" " ),
265267 " OPL error: expected integer" );
You can’t perform that action at this time.
0 commit comments