[libc++][test] Miscellaneous MSVC cleanups
authorCasey Carter <Casey@Carter.net>
Wed, 9 Oct 2019 22:19:17 +0000 (22:19 +0000)
committerCasey Carter <Casey@Carter.net>
Wed, 9 Oct 2019 22:19:17 +0000 (22:19 +0000)
commitb2e3c83b0d64a7ac5c3da5829b4cc0374674f5d1
tree14feb9735f789ddcde0f0846d088b503e5263bd3
parentdc9276b7d72342b4ddd8fff04ec8933dcdf375d4
[libc++][test] Miscellaneous MSVC cleanups

* Silence unused-local-typedef warnings: `map.cons/assign_initializer_list.pass.cpp` (and the `set.cons` variant) uses a local typedef only within `LIBCPP_ASSERT`s, so clang diagnoses it as unused when testing non-libc++.
* Add missing include: `c.math/abs.pass.cpp` uses `std::numeric_limits` but failed to `#include <limits>`.
* Don't test non-type: A "recent" change to `meta.trans.other/underlying_type.pass.cpp` unconditionally tests the type `F` which is conditionally defined.
* Use `hash<long long>` instead of `hash<short>` with `int` in `unordered_meow` deduction guide tests to avoid truncation warnings.
* Convert `3.14` explicitly in `midpoint.float.pass` since MSVC incorrectly diagnoses `float meow = 3.14;` as truncating.

Differential Revision: https://reviews.llvm.org/D68681

llvm-svn: 374248
libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.pass.cpp
libcxx/test/std/numerics/c.math/abs.pass.cpp
libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp