[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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@374248 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp b/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
index f955135..0a8db58 100644
--- a/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
+++ b/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
@@ -75,23 +75,22 @@
 
 void duplicate_keys_test() {
   typedef std::map<int, int, std::less<int>, test_allocator<std::pair<const int, int> > > Map;
-  typedef test_alloc_base AllocBase;
   {
-    LIBCPP_ASSERT(AllocBase::alloc_count == 0);
+    LIBCPP_ASSERT(test_alloc_base::alloc_count == 0);
     Map s = {{1, 0}, {2, 0}, {3, 0}};
-    LIBCPP_ASSERT(AllocBase::alloc_count == 3);
+    LIBCPP_ASSERT(test_alloc_base::alloc_count == 3);
     s = {{4, 0}, {4, 0}, {4, 0}, {4, 0}};
-    LIBCPP_ASSERT(AllocBase::alloc_count == 1);
+    LIBCPP_ASSERT(test_alloc_base::alloc_count == 1);
     assert(s.size() == 1);
     assert(s.begin()->first == 4);
   }
-  LIBCPP_ASSERT(AllocBase::alloc_count == 0);
+  LIBCPP_ASSERT(test_alloc_base::alloc_count == 0);
 }
 
 int main(int, char**)
 {
-    test_basic();
-    duplicate_keys_test();
+  test_basic();
+  duplicate_keys_test();
 
   return 0;
 }
diff --git a/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp b/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp
index 3762446..7efe3fc 100644
--- a/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp
+++ b/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp
@@ -57,17 +57,16 @@
 
 void duplicate_keys_test() {
   typedef std::set<int, std::less<int>, test_allocator<int> > Set;
-  typedef test_alloc_base AllocBase;
   {
-    LIBCPP_ASSERT(AllocBase::alloc_count == 0);
+    LIBCPP_ASSERT(test_alloc_base::alloc_count == 0);
     Set s = {1, 2, 3};
-    LIBCPP_ASSERT(AllocBase::alloc_count == 3);
+    LIBCPP_ASSERT(test_alloc_base::alloc_count == 3);
     s = {4, 4, 4, 4, 4};
-    LIBCPP_ASSERT(AllocBase::alloc_count == 1);
+    LIBCPP_ASSERT(test_alloc_base::alloc_count == 1);
     assert(s.size() == 1);
     assert(*s.begin() == 4);
   }
-  LIBCPP_ASSERT(AllocBase::alloc_count == 0);
+  LIBCPP_ASSERT(test_alloc_base::alloc_count == 0);
 }
 
 int main(int, char**) {
diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp
index 0923597..503477b 100644
--- a/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp
+++ b/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp
@@ -87,22 +87,22 @@
 
     {
     const P arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
-    std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>());
-    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<int>>);
+    std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>());
+    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<int>>);
     assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
     }
 
     {
     const P arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
-    std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>(), std::equal_to<>());
-    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<>>);
+    std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), std::equal_to<>());
+    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<>>);
     assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
     }
 
     {
     const P arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
-    std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>(), std::equal_to<>(), test_allocator<PC>(0, 41));
-    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>>);
+    std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), std::equal_to<>(), test_allocator<PC>(0, 41));
+    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>>);
     assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
     assert(m.get_allocator().get_id() == 41);
     }
@@ -122,7 +122,7 @@
     }
 
     {
-    std::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>> source;
+    std::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>> source;
     test_allocator<PC> a(0, 42);
     std::unordered_map m(source, a);
     ASSERT_SAME_TYPE(decltype(m), decltype(source));
@@ -131,7 +131,7 @@
     }
 
     {
-    std::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>> source;
+    std::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>> source;
     test_allocator<PC> a(0, 43);
     std::unordered_map m{source, a};  // braces instead of parens
     ASSERT_SAME_TYPE(decltype(m), decltype(source));
@@ -152,20 +152,20 @@
     }
 
     {
-    std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<short>());
-    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>>);
+    std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<long long>());
+    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>>);
     assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
     }
 
     {
-    std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<short>(), std::equal_to<>());
-    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<>>);
+    std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<long long>(), std::equal_to<>());
+    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<>>);
     assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
     }
 
     {
-    std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<short>(), std::equal_to<>(), test_allocator<PC>(0, 44));
-    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>>);
+    std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<long long>(), std::equal_to<>(), test_allocator<PC>(0, 44));
+    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>>);
     assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
     assert(m.get_allocator().get_id() == 44);
     }
@@ -180,8 +180,8 @@
 
     {
     const P arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
-    std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>(), test_allocator<PC>(0, 46));
-    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<int>, test_allocator<PC>>);
+    std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), test_allocator<PC>(0, 46));
+    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<int>, test_allocator<PC>>);
     assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
     assert(m.get_allocator().get_id() == 46);
     }
@@ -194,8 +194,8 @@
     }
 
     {
-    std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<short>(), test_allocator<PC>(0, 48));
-    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<int>, test_allocator<PC>>);
+    std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<long long>(), test_allocator<PC>(0, 48));
+    ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<int>, test_allocator<PC>>);
     assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
     assert(m.get_allocator().get_id() == 48);
     }
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.pass.cpp
index 683d201..52693c4 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.pass.cpp
@@ -78,37 +78,37 @@
 
     {
     const int arr[] = { 1, 2, 1, INT_MAX, 3 };
-    std::unordered_multiset s(std::begin(arr), std::end(arr), 42, std::hash<short>());
+    std::unordered_multiset s(std::begin(arr), std::end(arr), 42, std::hash<long long>());
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<short>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<long long>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     }
 
     {
     const int arr[] = { 1, 2, 1, INT_MAX, 3 };
-    std::unordered_multiset s(std::begin(arr), std::end(arr), 42, std::hash<short>(), test_allocator<int>(0, 40));
+    std::unordered_multiset s(std::begin(arr), std::end(arr), 42, std::hash<long long>(), test_allocator<int>(0, 40));
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<short>, std::equal_to<int>, test_allocator<int>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<long long>, std::equal_to<int>, test_allocator<int>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     assert(s.get_allocator().get_id() == 40);
     }
 
     {
-    std::unordered_multiset<int, std::hash<short>, std::equal_to<>, test_allocator<int>> source;
+    std::unordered_multiset<int, std::hash<long long>, std::equal_to<>, test_allocator<int>> source;
     std::unordered_multiset s(source);
     ASSERT_SAME_TYPE(decltype(s), decltype(source));
     assert(s.size() == 0);
     }
 
     {
-    std::unordered_multiset<int, std::hash<short>, std::equal_to<>, test_allocator<int>> source;
+    std::unordered_multiset<int, std::hash<long long>, std::equal_to<>, test_allocator<int>> source;
     std::unordered_multiset s{source};  // braces instead of parens
     ASSERT_SAME_TYPE(decltype(s), decltype(source));
     assert(s.size() == 0);
     }
 
     {
-    std::unordered_multiset<int, std::hash<short>, std::equal_to<>, test_allocator<int>> source;
+    std::unordered_multiset<int, std::hash<long long>, std::equal_to<>, test_allocator<int>> source;
     std::unordered_multiset s(source, test_allocator<int>(0, 41));
     ASSERT_SAME_TYPE(decltype(s), decltype(source));
     assert(s.size() == 0);
@@ -116,7 +116,7 @@
     }
 
     {
-    std::unordered_multiset<int, std::hash<short>, std::equal_to<>, test_allocator<int>> source;
+    std::unordered_multiset<int, std::hash<long long>, std::equal_to<>, test_allocator<int>> source;
     std::unordered_multiset s{source, test_allocator<int>(0, 42)};  // braces instead of parens
     ASSERT_SAME_TYPE(decltype(s), decltype(source));
     assert(s.size() == 0);
@@ -138,23 +138,23 @@
     }
 
     {
-    std::unordered_multiset s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<short>());
+    std::unordered_multiset s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<long long>());
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<short>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<long long>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     }
 
     {
-    std::unordered_multiset s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<short>(), std::equal_to<>());
+    std::unordered_multiset s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<long long>(), std::equal_to<>());
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<short>, std::equal_to<>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<long long>, std::equal_to<>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     }
 
     {
-    std::unordered_multiset s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<short>(), std::equal_to<>(), test_allocator<int>(0, 43));
+    std::unordered_multiset s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<long long>(), std::equal_to<>(), test_allocator<int>(0, 43));
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<short>, std::equal_to<>, test_allocator<int>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<long long>, std::equal_to<>, test_allocator<int>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     assert(s.get_allocator().get_id() == 43);
     }
@@ -170,9 +170,9 @@
 
     {
     const int arr[] = { 1, 2, 1, INT_MAX, 3 };
-    std::unordered_multiset s(std::begin(arr), std::end(arr), 42, std::hash<short>(), test_allocator<int>(0, 44));
+    std::unordered_multiset s(std::begin(arr), std::end(arr), 42, std::hash<long long>(), test_allocator<int>(0, 44));
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<short>, std::equal_to<int>, test_allocator<int>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<long long>, std::equal_to<int>, test_allocator<int>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     assert(s.get_allocator().get_id() == 44);
     }
@@ -186,9 +186,9 @@
     }
 
     {
-    std::unordered_multiset s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<short>(), test_allocator<int>(0, 42));
+    std::unordered_multiset s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<long long>(), test_allocator<int>(0, 42));
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<short>, std::equal_to<int>, test_allocator<int>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_multiset<int, std::hash<long long>, std::equal_to<int>, test_allocator<int>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     assert(s.get_allocator().get_id() == 42);
     }
diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.pass.cpp
index 95bc082..150441a 100644
--- a/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.pass.cpp
+++ b/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.pass.cpp
@@ -78,37 +78,37 @@
 
     {
     const int arr[] = { 1, 2, 1, INT_MAX, 3 };
-    std::unordered_set s(std::begin(arr), std::end(arr), 42, std::hash<short>());
+    std::unordered_set s(std::begin(arr), std::end(arr), 42, std::hash<long long>());
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<short>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<long long>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     }
 
     {
     const int arr[] = { 1, 2, 1, INT_MAX, 3 };
-    std::unordered_set s(std::begin(arr), std::end(arr), 42, std::hash<short>(), test_allocator<int>(0, 40));
+    std::unordered_set s(std::begin(arr), std::end(arr), 42, std::hash<long long>(), test_allocator<int>(0, 40));
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<short>, std::equal_to<int>, test_allocator<int>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<long long>, std::equal_to<int>, test_allocator<int>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     assert(s.get_allocator().get_id() == 40);
     }
 
     {
-    std::unordered_set<int, std::hash<short>, std::equal_to<>, test_allocator<int>> source;
+    std::unordered_set<int, std::hash<long long>, std::equal_to<>, test_allocator<int>> source;
     std::unordered_set s(source);
     ASSERT_SAME_TYPE(decltype(s), decltype(source));
     assert(s.size() == 0);
     }
 
     {
-    std::unordered_set<int, std::hash<short>, std::equal_to<>, test_allocator<int>> source;
+    std::unordered_set<int, std::hash<long long>, std::equal_to<>, test_allocator<int>> source;
     std::unordered_set s{source};  // braces instead of parens
     ASSERT_SAME_TYPE(decltype(s), decltype(source));
     assert(s.size() == 0);
     }
 
     {
-    std::unordered_set<int, std::hash<short>, std::equal_to<>, test_allocator<int>> source;
+    std::unordered_set<int, std::hash<long long>, std::equal_to<>, test_allocator<int>> source;
     std::unordered_set s(source, test_allocator<int>(0, 41));
     ASSERT_SAME_TYPE(decltype(s), decltype(source));
     assert(s.size() == 0);
@@ -116,7 +116,7 @@
     }
 
     {
-    std::unordered_set<int, std::hash<short>, std::equal_to<>, test_allocator<int>> source;
+    std::unordered_set<int, std::hash<long long>, std::equal_to<>, test_allocator<int>> source;
     std::unordered_set s{source, test_allocator<int>(0, 42)};  // braces instead of parens
     ASSERT_SAME_TYPE(decltype(s), decltype(source));
     assert(s.size() == 0);
@@ -138,23 +138,23 @@
     }
 
     {
-    std::unordered_set s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<short>());
+    std::unordered_set s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<long long>());
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<short>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<long long>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     }
 
     {
-    std::unordered_set s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<short>(), std::equal_to<>());
+    std::unordered_set s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<long long>(), std::equal_to<>());
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<short>, std::equal_to<>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<long long>, std::equal_to<>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     }
 
     {
-    std::unordered_set s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<short>(), std::equal_to<>(), test_allocator<int>(0, 43));
+    std::unordered_set s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<long long>(), std::equal_to<>(), test_allocator<int>(0, 43));
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<short>, std::equal_to<>, test_allocator<int>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<long long>, std::equal_to<>, test_allocator<int>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     assert(s.get_allocator().get_id() == 43);
     }
@@ -170,9 +170,9 @@
 
     {
     const int arr[] = { 1, 2, 1, INT_MAX, 3 };
-    std::unordered_set s(std::begin(arr), std::end(arr), 42, std::hash<short>(), test_allocator<int>(0, 44));
+    std::unordered_set s(std::begin(arr), std::end(arr), 42, std::hash<long long>(), test_allocator<int>(0, 44));
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<short>, std::equal_to<int>, test_allocator<int>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<long long>, std::equal_to<int>, test_allocator<int>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     assert(s.get_allocator().get_id() == 44);
     }
@@ -186,9 +186,9 @@
     }
 
     {
-    std::unordered_set s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<short>(), test_allocator<int>(0, 42));
+    std::unordered_set s({ 1, 2, 1, INT_MAX, 3 }, 42, std::hash<long long>(), test_allocator<int>(0, 42));
 
-    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<short>, std::equal_to<int>, test_allocator<int>>);
+    ASSERT_SAME_TYPE(decltype(s), std::unordered_set<int, std::hash<long long>, std::equal_to<int>, test_allocator<int>>);
     assert(std::is_permutation(s.begin(), s.end(), std::begin(expected_s), std::end(expected_s)));
     assert(s.get_allocator().get_id() == 42);
     }
diff --git a/test/std/numerics/c.math/abs.pass.cpp b/test/std/numerics/c.math/abs.pass.cpp
index bdca9a6..3196f22 100644
--- a/test/std/numerics/c.math/abs.pass.cpp
+++ b/test/std/numerics/c.math/abs.pass.cpp
@@ -9,6 +9,7 @@
 #include <assert.h>
 #include <cmath>
 #include <cstdint>
+#include <limits>
 #include <type_traits>
 
 #include "test_macros.h"
@@ -75,4 +76,3 @@
 
     return 0;
 }
-
diff --git a/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp b/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
index aeb9a19..2c5d240 100644
--- a/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
+++ b/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
@@ -41,7 +41,7 @@
 
     constexpr T maxV = std::numeric_limits<T>::max();
     constexpr T minV = std::numeric_limits<T>::min();
-    
+
 //  Things that can be compared exactly
     static_assert((std::midpoint(T(0), T(0))   == T(0)),   "");
     static_assert((std::midpoint(T(2), T(4))   == T(3)),   "");
@@ -58,7 +58,7 @@
     assert((fptest_close_pct(std::midpoint(T(0.1),  T(0.4)),  T(0.25),     pct)));
 
     assert((fptest_close_pct(std::midpoint(T(11.2345), T(14.5432)), T(12.88885),  pct)));
-    
+
 //  From e to pi
     assert((fptest_close_pct(std::midpoint(T(2.71828182845904523536028747135266249775724709369995),
                                       T(3.14159265358979323846264338327950288419716939937510)),
@@ -86,7 +86,7 @@
 //  TODO
 
 //  Check two values "close to each other"
-    T d1 = 3.14;
+    T d1 = T(3.14);
     T d0 = std::nextafter(d1, T(2));
     T d2 = std::nextafter(d1, T(5));
     assert(d0 < d1);  // sanity checking
diff --git a/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp b/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
index fbbab50..3e08855 100644
--- a/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
+++ b/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
@@ -42,7 +42,7 @@
     ASSERT_SAME_TYPE(Expected, typename std::underlying_type<T>::type);
 #if TEST_STD_VER > 11
     ASSERT_SAME_TYPE(Expected, typename std::underlying_type_t<T>);
-#endif  
+#endif
 }
 
 enum E { V = INT_MIN };
@@ -79,7 +79,9 @@
 //  SFINAE-able underlying_type
 #if TEST_STD_VER > 17
     static_assert( has_type_member<E>::value, "");
+#ifdef TEST_UNSIGNED_UNDERLYING_TYPE
     static_assert( has_type_member<F>::value, "");
+#endif // TEST_UNSIGNED_UNDERLYING_TYPE
     static_assert( has_type_member<G>::value, "");
 
     static_assert(!has_type_member<void>::value, "");