Skip to content

Commit af9c22e

Browse files
committed
Workaround for int that is too large
Fixes MSVC warning. This is due to the way integer literals are parsed.
1 parent 9b0bcd6 commit af9c22e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test-output-pgsql-int4.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ TEST_CASE("int4 conversion")
4444
CHECK(2147483647 == conn.result_as_int(population(4)));
4545
CHECK(10000 == conn.result_as_int(population(5)));
4646
CHECK(-10000 == conn.result_as_int(population(6)));
47-
CHECK(-2147483648 == conn.result_as_int(population(7)));
47+
CHECK((-2147483647 - 1) == conn.result_as_int(population(7)));
4848

4949
// More out of range negative values
5050
conn.assert_null(population(8));
@@ -59,7 +59,7 @@ TEST_CASE("int4 conversion")
5959
CHECK(2147483647 == conn.result_as_int(population(13)));
6060
CHECK(15000 == conn.result_as_int(population(14)));
6161
CHECK(-15000 == conn.result_as_int(population(15)));
62-
CHECK(-2147483648 == conn.result_as_int(population(16)));
62+
CHECK((-2147483647 - 1) == conn.result_as_int(population(16)));
6363

6464
// More out of range negative values
6565
conn.assert_null(population(17));

0 commit comments

Comments
 (0)