diff --git a/test/unittests/test_int128.cpp b/test/unittests/test_int128.cpp index 414ef32c..64dfcd21 100644 --- a/test/unittests/test_int128.cpp +++ b/test/unittests/test_int128.cpp @@ -6,6 +6,8 @@ #include #include +#pragma warning(disable : 4307) + #define EXPECT_THROW_MESSAGE(stmt, ex_type, expected) \ try \ { \ diff --git a/test/unittests/test_intx_api.cpp b/test/unittests/test_intx_api.cpp index 46e55476..fde0b28c 100644 --- a/test/unittests/test_intx_api.cpp +++ b/test/unittests/test_intx_api.cpp @@ -1,11 +1,13 @@ // intx: extended precision integer library. -// Copyright 2019 Pawel Bylica. +// Copyright 2019-2020 Pawel Bylica. // Licensed under the Apache License, Version 2.0. #include "test_utils.hpp" #include #include +#pragma warning(disable : 4307) + using namespace intx; static_assert(uint128{2} + uint128{2} == 4, ""); @@ -13,11 +15,8 @@ static_assert(uint256{2} + uint256{2} == 4, ""); static_assert(uint512{2} + uint512{2} == 4, ""); static_assert(uint128{2} - uint128{1} == 1, ""); -#ifndef _MSC_VER -// FIXME: Investigate "integer constant overflow" issue on MSVC. static_assert(uint256{2} - uint256{1} == 1, ""); static_assert(uint512{2} - uint512{1} == 1, ""); -#endif static_assert(constexpr_mul(uint128{2}, uint128{2}) == 4, ""); static_assert(constexpr_mul(uint256{2}, uint256{2}) == 4, "");