WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 8c4bf60

Browse files
committed
update tests
1 parent 056c8ef commit 8c4bf60

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

SlotMapTest01.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,17 @@ TEST(SlotMapTest, TagTest32)
273273
EXPECT_EQ(ud2, 3u);
274274
}
275275

276-
TEST(SlotMapTest, KeyImplicitConversionToNumber64)
276+
TEST(SlotMapTest, KeyConversionToNumber64)
277277
{
278278
auto key = dod::slot_map_key64<int>::invalid();
279-
uint64_t test = key;
279+
uint64_t test = uint64_t(key);
280280
EXPECT_EQ(test, 0ull);
281281
}
282282

283-
TEST(SlotMapTest, KeyImplicitConversionToNumber32)
283+
TEST(SlotMapTest, KeyConversionToNumber32)
284284
{
285285
auto key = dod::slot_map_key32<int>::invalid();
286-
uint32_t test = key;
286+
uint32_t test = uint32_t(key);
287287
EXPECT_EQ(test, 0ull);
288288
}
289289

SlotMapTest04.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ TEST(SlotMapTest, CompileTimeTypeSafety)
230230
using TSlotMapInt = dod::slot_map32<int>;
231231
using TSlotMapFloat = dod::slot_map32<float>;
232232

233-
TSlotMapInt::key keyInt;
234-
TSlotMapFloat::key keyFloat;
233+
TSlotMapInt::key keyInt = TSlotMapInt::key::invalid();
234+
TSlotMapFloat::key keyFloat = TSlotMapFloat::key::invalid();
235235

236236
keyInt = keyInt; // OK
237237
keyFloat == keyFloat; // OK

0 commit comments

Comments
 (0)