diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-04-29 04:07:45 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-04-29 04:07:45 +0000 |
| commit | 382e91792b1ada3f8b462685a4a142a326b33448 (patch) | |
| tree | 57df778daf819529dc7a1794e11fd2895c2867ac /libcxx/test/std/containers/sequences | |
| parent | 1816d03b7dc5bdb5335b37e5dacce22d5df9d15f (diff) | |
| download | bcm5719-llvm-382e91792b1ada3f8b462685a4a142a326b33448.tar.gz bcm5719-llvm-382e91792b1ada3f8b462685a4a142a326b33448.zip | |
Fix or move various non-standard tests.
This patch does the following:
* Remove <__config> includes from some container tests.
* Guards uses of std::launch::any in async tests because it's an extension.
* Move "test/std/extensions" to "test/libcxx/extensions"
* Moves various non-standard tests including those in "sequences/vector",
"std/localization" and "utilities/meta".
llvm-svn: 267981
Diffstat (limited to 'libcxx/test/std/containers/sequences')
14 files changed, 0 insertions, 742 deletions
diff --git a/libcxx/test/std/containers/sequences/vector/const_value_type.pass.cpp b/libcxx/test/std/containers/sequences/vector/const_value_type.pass.cpp deleted file mode 100644 index e16e439dec4..00000000000 --- a/libcxx/test/std/containers/sequences/vector/const_value_type.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// vector<const int> v; // an extension - -#include <vector> -#include <type_traits> - -int main() -{ -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS - std::vector<const int> v = {1, 2, 3}; -#endif -} diff --git a/libcxx/test/std/containers/sequences/vector/db_back.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_back.pass.cpp deleted file mode 100644 index 05f3d07712e..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_back.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Call back() on empty container. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c(1); - assert(c.back() == 0); - c.clear(); - assert(c.back() == 0); - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c(1); - assert(c.back() == 0); - c.clear(); - assert(c.back() == 0); - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_cback.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_cback.pass.cpp deleted file mode 100644 index 5eb1a353e8b..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_cback.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Call back() on empty const container. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - const C c; - assert(c.back() == 0); - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - const C c; - assert(c.back() == 0); - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_cfront.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_cfront.pass.cpp deleted file mode 100644 index 5e54da1d444..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_cfront.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Call front() on empty const container. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - const C c; - assert(c.front() == 0); - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - const C c; - assert(c.front() == 0); - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_cindex.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_cindex.pass.cpp deleted file mode 100644 index 133aa565282..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_cindex.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Index const vector out of bounds. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - const C c(1); - assert(c[0] == 0); - assert(c[1] == 0); - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - const C c(1); - assert(c[0] == 0); - assert(c[1] == 0); - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_front.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_front.pass.cpp deleted file mode 100644 index 388058fb315..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_front.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Call front() on empty container. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c(1); - assert(c.front() == 0); - c.clear(); - assert(c.front() == 0); - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c(1); - assert(c.front() == 0); - c.clear(); - assert(c.front() == 0); - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_index.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_index.pass.cpp deleted file mode 100644 index 1daf076da67..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_index.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Index vector out of bounds. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c(1); - assert(c[0] == 0); - c.clear(); - assert(c[0] == 0); - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c(1); - assert(c[0] == 0); - c.clear(); - assert(c[0] == 0); - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_iterators_2.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_iterators_2.pass.cpp deleted file mode 100644 index 2d43843067b..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_iterators_2.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Compare iterators from different containers with <. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c1; - C c2; - bool b = c1.begin() < c2.begin(); - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c1; - C c2; - bool b = c1.begin() < c2.begin(); - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_iterators_3.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_iterators_3.pass.cpp deleted file mode 100644 index 051d66c3339..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_iterators_3.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Subtract iterators from different containers. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c1; - C c2; - int i = c1.begin() - c2.begin(); - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c1; - C c2; - int i = c1.begin() - c2.begin(); - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_iterators_4.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_iterators_4.pass.cpp deleted file mode 100644 index 4c2aa628de1..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_iterators_4.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Index iterator out of bounds. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c(1); - C::iterator i = c.begin(); - assert(i[0] == 0); - assert(i[1] == 0); - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c(1); - C::iterator i = c.begin(); - assert(i[0] == 0); - assert(i[1] == 0); - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_iterators_5.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_iterators_5.pass.cpp deleted file mode 100644 index 1b1090499c2..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_iterators_5.pass.cpp +++ /dev/null @@ -1,60 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Add to iterator out of bounds. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c(1); - C::iterator i = c.begin(); - i += 1; - assert(i == c.end()); - i = c.begin(); - i += 2; - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c(1); - C::iterator i = c.begin(); - i += 1; - assert(i == c.end()); - i = c.begin(); - i += 2; - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_iterators_6.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_iterators_6.pass.cpp deleted file mode 100644 index 424bc939b13..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_iterators_6.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Decrement iterator prior to begin. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c(1); - C::iterator i = c.end(); - --i; - assert(i == c.begin()); - --i; - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c(1); - C::iterator i = c.end(); - --i; - assert(i == c.begin()); - --i; - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_iterators_7.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_iterators_7.pass.cpp deleted file mode 100644 index 72cdb10cbc8..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_iterators_7.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Increment iterator past end. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c(1); - C::iterator i = c.begin(); - ++i; - assert(i == c.end()); - ++i; - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c(1); - C::iterator i = c.begin(); - ++i; - assert(i == c.end()); - ++i; - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif diff --git a/libcxx/test/std/containers/sequences/vector/db_iterators_8.pass.cpp b/libcxx/test/std/containers/sequences/vector/db_iterators_8.pass.cpp deleted file mode 100644 index 7b898533197..00000000000 --- a/libcxx/test/std/containers/sequences/vector/db_iterators_8.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// <vector> - -// Dereference non-dereferenceable iterator. - -#if _LIBCPP_DEBUG >= 1 - -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) - -#include <vector> -#include <cassert> -#include <iterator> -#include <exception> -#include <cstdlib> - -#include "min_allocator.h" - -int main() -{ - { - typedef int T; - typedef std::vector<T> C; - C c(1); - C::iterator i = c.end(); - T j = *i; - assert(false); - } -#if __cplusplus >= 201103L - { - typedef int T; - typedef std::vector<T, min_allocator<T>> C; - C c(1); - C::iterator i = c.end(); - T j = *i; - assert(false); - } -#endif -} - -#else - -int main() -{ -} - -#endif |

