Simply debug mode tests per Dmitri Gribenko's suggestion.

llvm-svn: 178026
This commit is contained in:
Howard Hinnant 2013-03-26 14:28:25 +00:00
parent cf3d5aaea9
commit ea95898f29
21 changed files with 21 additions and 148 deletions

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c(1); C c(1);

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
const C c; const C c;

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
const C c; const C c;

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
const C c(1); const C c(1);

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c(1); C c(1);

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c(1); C c(1);

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c1; C c1;

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c1; C c1;

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c1; C c1;

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c(1); C c(1);

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c(1); C c(1);

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c(1); C c(1);

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c(1); C c(1);

View File

@ -13,7 +13,7 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
@ -21,14 +21,8 @@
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
typedef int T; typedef int T;
typedef std::vector<T> C; typedef std::vector<T> C;
C c(1); C c(1);

View File

@ -13,21 +13,15 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
#include <cstdlib> #include <cstdlib>
#include <exception> #include <exception>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
int a1[] = {1, 2, 3}; int a1[] = {1, 2, 3};
std::vector<int> l1(a1, a1+3); std::vector<int> l1(a1, a1+3);
std::vector<int>::const_iterator i = l1.end(); std::vector<int>::const_iterator i = l1.end();

View File

@ -13,21 +13,15 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
#include <cstdlib> #include <cstdlib>
#include <exception> #include <exception>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
int a1[] = {1, 2, 3}; int a1[] = {1, 2, 3};
std::vector<int> l1(a1, a1+3); std::vector<int> l1(a1, a1+3);
std::vector<int> l2(a1, a1+3); std::vector<int> l2(a1, a1+3);

View File

@ -13,21 +13,15 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
int a1[] = {1, 2, 3}; int a1[] = {1, 2, 3};
std::vector<int> l1(a1, a1+3); std::vector<int> l1(a1, a1+3);
std::vector<int> l2(a1, a1+3); std::vector<int> l2(a1, a1+3);

View File

@ -13,21 +13,15 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
int a1[] = {1, 2, 3}; int a1[] = {1, 2, 3};
std::vector<int> l1(a1, a1+3); std::vector<int> l1(a1, a1+3);
std::vector<int> l2(a1, a1+3); std::vector<int> l2(a1, a1+3);

View File

@ -13,21 +13,15 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
int a1[] = {1, 2, 3}; int a1[] = {1, 2, 3};
std::vector<int> l1(a1, a1+3); std::vector<int> l1(a1, a1+3);
std::vector<int> l2(a1, a1+3); std::vector<int> l2(a1, a1+3);

View File

@ -13,21 +13,15 @@
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#include <vector> #include <vector>
#include <cassert> #include <cassert>
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
void f1()
{
std::exit(0);
}
int main() int main()
{ {
std::set_terminate(f1);
int a1[] = {1, 2, 3}; int a1[] = {1, 2, 3};
std::vector<int> l1(a1, a1+3); std::vector<int> l1(a1, a1+3);
std::vector<int>::iterator i = l1.erase(l1.cbegin()+1, l1.cbegin()); std::vector<int>::iterator i = l1.erase(l1.cbegin()+1, l1.cbegin());

View File

@ -12,7 +12,7 @@
// void pop_back(); // void pop_back();
#if _LIBCPP_DEBUG2 >= 1 #if _LIBCPP_DEBUG2 >= 1
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::terminate()) #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
#endif #endif
#include <vector> #include <vector>
@ -23,17 +23,10 @@
#include <cstdlib> #include <cstdlib>
#include <exception> #include <exception>
void f1()
{
std::exit(0);
}
#endif #endif
int main() int main()
{ {
#if _LIBCPP_DEBUG2 >= 1
std::set_terminate(f1);
#endif
{ {
std::vector<int> c; std::vector<int> c;
c.push_back(1); c.push_back(1);