Changeset 32d53a7 in mainline
- Timestamp:
- 2018-07-05T21:41:25Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2e328c3
- Parents:
- e84c961
- git-author:
- Dzejrou <dzejrou@…> (2018-07-02 20:31:29)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:25)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/src/__bits/test/unordered_map.cpp
re84c961 r32d53a7 183 183 test_eq("*insert*_or_assign equivalence pt2", res9.first->second, std::string{"E"}); 184 184 185 auto res10 =map2.erase(map2.find(7));185 map2.erase(map2.find(7)); 186 186 test_eq("erase", map2.find(7), map2.end()); 187 test_eq("highest erased", res10, map2.end()); 188 187 188 auto res10 = map2.erase(6); 189 test_eq("erase by key pt1", res10, 1U); 189 190 auto res11 = map2.erase(6); 190 test_eq("erase by key pt1", res11, 1U); 191 auto res12 = map2.erase(6); 192 test_eq("erase by key pt2", res12, 0U); 193 194 auto res13 = map2.insert(std::pair<const int, const char*>{11, "test"}); 195 test_eq("insert with constructible argument pt1", res13.second, true); 196 test_eq("insert with constructible argument pt2", res13.first->first, 11); 197 test_eq("insert with constructible argument pt3", res13.first->second, std::string{"test"}); 191 test_eq("erase by key pt2", res11, 0U); 192 193 auto res12 = map2.insert(std::pair<const int, const char*>{11, "test"}); 194 test_eq("insert with constructible argument pt1", res12.second, true); 195 test_eq("insert with constructible argument pt2", res12.first->first, 11); 196 test_eq("insert with constructible argument pt3", res12.first->second, std::string{"test"}); 198 197 199 198 std::unordered_map<int, int> map3{}; 200 199 map3[1] = 1; 201 auto res1 5= map3.count(1);202 test_eq("count", res1 5, 1U);200 auto res13 = map3.count(1); 201 test_eq("count", res13, 1U); 203 202 204 203 map2.clear();
Note:
See TracChangeset
for help on using the changeset viewer.