diff options
author | Juan Gu <juan.gu@mongodb.com> | 2022-08-19 20:30:18 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-19 21:28:53 +0000 |
commit | 50ce932ad0e2542e9238d968d3f7ce1a163f5b42 (patch) | |
tree | 934a1db2a509590ec05d1887d5d16841160ca96e /src/mongo/db/concurrency | |
parent | bd3a4efde0c07c5760111607d268383a83a6bce4 (diff) | |
download | mongo-50ce932ad0e2542e9238d968d3f7ce1a163f5b42.tar.gz |
SERVER-68830 did some tidy clang fixes
Diffstat (limited to 'src/mongo/db/concurrency')
-rw-r--r-- | src/mongo/db/concurrency/fast_map_noalloc_test.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mongo/db/concurrency/fast_map_noalloc_test.cpp b/src/mongo/db/concurrency/fast_map_noalloc_test.cpp index 7cd80e9c510..3357b560815 100644 --- a/src/mongo/db/concurrency/fast_map_noalloc_test.cpp +++ b/src/mongo/db/concurrency/fast_map_noalloc_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#include <boost/lexical_cast.hpp> #include <string> #include "mongo/db/concurrency/fast_map_noalloc.h" @@ -95,8 +94,7 @@ TEST(FastMapNoAlloc, FindAndRemove) { TestFastMapNoAlloc map; for (int i = 0; i < 6; i++) { - map.insert(ResourceId(RESOURCE_COLLECTION, i)) - ->initNew(i, "Item" + boost::lexical_cast<std::string>(i)); + map.insert(ResourceId(RESOURCE_COLLECTION, i))->initNew(i, "Item" + std::to_string(i)); } for (int i = 0; i < 6; i++) { @@ -104,7 +102,7 @@ TEST(FastMapNoAlloc, FindAndRemove) { ASSERT_EQUALS(i, map.find(ResourceId(RESOURCE_COLLECTION, i))->id); - ASSERT_EQUALS("Item" + boost::lexical_cast<std::string>(i), + ASSERT_EQUALS("Item" + std::to_string(i), map.find(ResourceId(RESOURCE_COLLECTION, i))->value); } @@ -138,17 +136,15 @@ TEST(FastMapNoAlloc, RemoveAll) { stdx::unordered_map<ResourceId, TestStruct> checkMap; for (int i = 1; i <= 6; i++) { - map.insert(ResourceId(RESOURCE_COLLECTION, i)) - ->initNew(i, "Item" + boost::lexical_cast<std::string>(i)); + map.insert(ResourceId(RESOURCE_COLLECTION, i))->initNew(i, "Item" + std::to_string(i)); - checkMap[ResourceId(RESOURCE_COLLECTION, i)].initNew( - i, "Item" + boost::lexical_cast<std::string>(i)); + checkMap[ResourceId(RESOURCE_COLLECTION, i)].initNew(i, "Item" + std::to_string(i)); } TestFastMapNoAlloc::Iterator it = map.begin(); while (!it.finished()) { ASSERT_EQUALS(it->id, checkMap[it.key()].id); - ASSERT_EQUALS("Item" + boost::lexical_cast<std::string>(it->id), checkMap[it.key()].value); + ASSERT_EQUALS("Item" + std::to_string(it->id), checkMap[it.key()].value); checkMap.erase(it.key()); it.remove(); |