llvm-project/libcxx/test/std/containers/associative/map/map.access
Stephan T. Lavavej fbfb2ab63e [libcxx] [test] D27021: Fix MSVC warning C4389 "signed/unsigned mismatch", part 8/12.
Add static_cast<std::size_t> when comparing distance() to size().

These replacements were performed programmatically with regex_replace():

const vector<pair<regex, string>> reg_fmt = {
    { regex(R"(assert\((\w+)\.size\(\) == std::distance\((\w+, \w+)\)\))"),
        "assert($1.size() == static_cast<std::size_t>(std::distance($2)))" },
    { regex(R"(assert\(distance\((\w+\.begin\(\), \w+\.end\(\))\) == (\w+)\.size\(\)\))"),
        "assert(static_cast<std::size_t>(distance($1)) == $2.size())" },
    { regex(R"(assert\(std::distance\((\w+\.\w*begin\(\), \w+\.\w*end\(\))\) == (\w+)\.size\(\)\))"),
        "assert(static_cast<std::size_t>(std::distance($1)) == $2.size())" },
};

Also, include <cstddef> when it wasn't already being included.

llvm-svn: 288745
2016-12-06 01:12:34 +00:00
..
at.pass.cpp Protect std::{,unordered_}map tests under noexceptions 2016-11-29 16:37:48 +00:00
empty.pass.cpp Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER. 2016-06-14 21:31:42 +00:00
index_key.pass.cpp Fix LWG issue 2469 - Use piecewise construction in map::operator[]. 2016-03-31 03:13:37 +00:00
index_rv_key.pass.cpp Fix LWG issue 2469 - Use piecewise construction in map::operator[]. 2016-03-31 03:13:37 +00:00
index_tuple.pass.cpp
iterator.pass.cpp [libcxx] [test] D27021: Fix MSVC warning C4389 "signed/unsigned mismatch", part 8/12. 2016-12-06 01:12:34 +00:00
max_size.pass.cpp [libcxx] Fix max_size() across all containers 2016-11-23 01:18:56 +00:00
size.pass.cpp Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER. 2016-06-14 21:31:42 +00:00