diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-09 10:02:49 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-09 10:02:55 +0100 |
commit | b403ec5c0f2fa0464a9d40f9d5c25beb0bd3c5df (patch) | |
tree | 5d11a82b2a63b869917a7be9bd55b0baa385d4e2 /src/test | |
parent | 02bd6e9bc6de9b1ce188335b1b2f2796d18e434c (diff) | |
parent | 8e0720bdb9141b00b4c00893b8139904c67ddacf (diff) |
Merge #9916: Fix msvc compiler error C4146 (minus operator applied to unsigned type)
8e0720b Fix msvc compiler error C4146 (unary minus operator applied to unsigned type) (kobake)
292112f Fix msvc compiler error C4146 (minus operator applied to unsigned type) (kobake)
Tree-SHA512: 25f408daf7bf9ffe4b8b4bd62f6f6d326219189a9faf8f8c0a135c5a0cb0511af765aa2b6087a091c8863c701289bda49a2379b00cd9b10854d316a5c3fc3f8e
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/util_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 641655621c..79d02257fa 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -321,7 +321,7 @@ BOOST_AUTO_TEST_CASE(test_ParseInt32) BOOST_CHECK(ParseInt32("1234", &n) && n == 1234); BOOST_CHECK(ParseInt32("01234", &n) && n == 1234); // no octal BOOST_CHECK(ParseInt32("2147483647", &n) && n == 2147483647); - BOOST_CHECK(ParseInt32("-2147483648", &n) && n == -2147483648); + BOOST_CHECK(ParseInt32("-2147483648", &n) && n == (-2147483647 - 1)); // (-2147483647 - 1) equals INT_MIN BOOST_CHECK(ParseInt32("-1234", &n) && n == -1234); // Invalid values BOOST_CHECK(!ParseInt32("", &n)); |