mirror of
https://github.com/status-im/evmc.git
synced 2025-02-23 16:38:06 +00:00
test: Disable constexpr context tests in Visual Studio 2015
This commit is contained in:
parent
815b81dfa3
commit
51ea691660
@ -335,9 +335,11 @@ TEST(cpp, bytes32_from_uint)
|
|||||||
using evmc::bytes32;
|
using evmc::bytes32;
|
||||||
using evmc::operator""_bytes32;
|
using evmc::operator""_bytes32;
|
||||||
|
|
||||||
|
#if !defined(_MSC_VER) || (_MSC_VER >= 1910 /* Only for Visual Studio 2017+ */)
|
||||||
static_assert(bytes32{0} == bytes32{}, "");
|
static_assert(bytes32{0} == bytes32{}, "");
|
||||||
static_assert(bytes32{3}.bytes[31] == 3, "");
|
static_assert(bytes32{3}.bytes[31] == 3, "");
|
||||||
static_assert(bytes32{0xfe00000000000000}.bytes[24] == 0xfe, "");
|
static_assert(bytes32{0xfe00000000000000}.bytes[24] == 0xfe, "");
|
||||||
|
#endif
|
||||||
|
|
||||||
EXPECT_EQ(bytes32{0}, bytes32{});
|
EXPECT_EQ(bytes32{0}, bytes32{});
|
||||||
EXPECT_EQ(bytes32{0x01},
|
EXPECT_EQ(bytes32{0x01},
|
||||||
@ -357,9 +359,11 @@ TEST(cpp, address_from_uint)
|
|||||||
using evmc::address;
|
using evmc::address;
|
||||||
using evmc::operator""_address;
|
using evmc::operator""_address;
|
||||||
|
|
||||||
|
#if !defined(_MSC_VER) || (_MSC_VER >= 1910 /* Only for Visual Studio 2017+ */)
|
||||||
static_assert(address{0} == address{}, "");
|
static_assert(address{0} == address{}, "");
|
||||||
static_assert(address{3}.bytes[19] == 3, "");
|
static_assert(address{3}.bytes[19] == 3, "");
|
||||||
static_assert(address{0xfe00000000000000}.bytes[12] == 0xfe, "");
|
static_assert(address{0xfe00000000000000}.bytes[12] == 0xfe, "");
|
||||||
|
#endif
|
||||||
|
|
||||||
EXPECT_EQ(address{0}, address{});
|
EXPECT_EQ(address{0}, address{});
|
||||||
EXPECT_EQ(address{0x01}, 0x0000000000000000000000000000000000000001_address);
|
EXPECT_EQ(address{0x01}, 0x0000000000000000000000000000000000000001_address);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user