Changeset 32d53a7 in mainline


Ignore:
Timestamp:
2018-07-05T21:41:25Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
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)
Message:

cpp: removed the highest_deleted test, which belonged to std::map and was irrelevant in std::unordered_map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/src/__bits/test/unordered_map.cpp

    re84c961 r32d53a7  
    183183        test_eq("*insert*_or_assign equivalence pt2", res9.first->second, std::string{"E"});
    184184
    185         auto res10 = map2.erase(map2.find(7));
     185        map2.erase(map2.find(7));
    186186        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);
    189190        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"});
    198197
    199198        std::unordered_map<int, int> map3{};
    200199        map3[1] = 1;
    201         auto res15 = map3.count(1);
    202         test_eq("count", res15, 1U);
     200        auto res13 = map3.count(1);
     201        test_eq("count", res13, 1U);
    203202
    204203        map2.clear();
Note: See TracChangeset for help on using the changeset viewer.