[libcxx] r347085 - [libcxx] Add missing includes in tests
Louis Dionne
ldionne at apple.com
Fri Nov 16 11:52:47 PST 2018
Author: ldionne
Date: Fri Nov 16 11:52:47 2018
New Revision: 347085
URL: http://llvm.org/viewvc/llvm-project?rev=347085&view=rev
Log:
[libcxx] Add missing includes in tests
A bunch of unordered containers tests call library functions but don't directly
include the corresponding header files:
- fabs() (defined in <cmath> which is not included);
- is_permutation() (defined in <algorithm> which is not included);
- next() (defined in <iterator> which is not included).
- As a result, these tests won't compile against some conformant libraries.
Reviewed as https://reviews.llvm.org/D54643.
Thanks to Andrey Maksimov for the patch.
Modified:
libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/erase_range.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/erase_range.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp
Modified: libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp Fri Nov 16 11:52:47 2018
@@ -21,6 +21,7 @@
#include <string>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "../../../test_compare.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp Fri Nov 16 11:52:47 2018
@@ -21,6 +21,7 @@
#include <string>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp Fri Nov 16 11:52:47 2018
@@ -21,6 +21,7 @@
#include <string>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp Fri Nov 16 11:52:47 2018
@@ -20,6 +20,7 @@
#include <string>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp Fri Nov 16 11:52:47 2018
@@ -19,6 +19,8 @@
#include <string>
#include <cassert>
#include <cfloat>
+#include <cmath>
+#include <algorithm>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp Fri Nov 16 11:52:47 2018
@@ -21,6 +21,7 @@
#include <string>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "../../../test_compare.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp Fri Nov 16 11:52:47 2018
@@ -21,6 +21,7 @@
#include <string>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp Fri Nov 16 11:52:47 2018
@@ -21,6 +21,7 @@
#include <string>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp Fri Nov 16 11:52:47 2018
@@ -20,6 +20,7 @@
#include <string>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/erase_range.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/erase_range.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/erase_range.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/erase_range.pass.cpp Fri Nov 16 11:52:47 2018
@@ -17,6 +17,7 @@
#include <unordered_set>
#include <cassert>
+#include <iterator>
#include "min_allocator.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp Fri Nov 16 11:52:47 2018
@@ -16,8 +16,10 @@
// unordered_multiset& operator=(const unordered_multiset& u);
#include <unordered_set>
+#include <algorithm>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp Fri Nov 16 11:52:47 2018
@@ -20,6 +20,7 @@
#include <unordered_set>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "../../../test_compare.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp Fri Nov 16 11:52:47 2018
@@ -20,6 +20,7 @@
#include <unordered_set>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp Fri Nov 16 11:52:47 2018
@@ -20,6 +20,7 @@
#include <unordered_set>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp Fri Nov 16 11:52:47 2018
@@ -19,6 +19,7 @@
#include <unordered_set>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.set/erase_range.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/erase_range.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/erase_range.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/erase_range.pass.cpp Fri Nov 16 11:52:47 2018
@@ -16,6 +16,7 @@
// iterator erase(const_iterator first, const_iterator last)
#include <unordered_set>
+#include <algorithm>
#include <cassert>
#include "min_allocator.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp Fri Nov 16 11:52:47 2018
@@ -16,8 +16,10 @@
// unordered_set& operator=(const unordered_set& u);
#include <unordered_set>
+#include <algorithm>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp Fri Nov 16 11:52:47 2018
@@ -20,6 +20,7 @@
#include <unordered_set>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "../../../test_compare.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp Fri Nov 16 11:52:47 2018
@@ -20,6 +20,7 @@
#include <unordered_set>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp Fri Nov 16 11:52:47 2018
@@ -20,6 +20,7 @@
#include <unordered_set>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp?rev=347085&r1=347084&r2=347085&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp Fri Nov 16 11:52:47 2018
@@ -19,6 +19,7 @@
#include <unordered_set>
#include <cassert>
#include <cfloat>
+#include <cmath>
#include <cstddef>
#include "test_macros.h"
More information about the libcxx-commits
mailing list