summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/testsuite/23_containers
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers')
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc26
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc18
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc4
7 files changed, 33 insertions, 27 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
index 167f1f2a12b..5fe41db88de 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
@@ -1,6 +1,6 @@
// 2005-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -29,12 +29,12 @@ const int A2[] = {0, 2, 3, 4, 10, 11, 12, 13, 14, 15};
const int A3[] = {0, 2, 3, 4, 10, 11};
const int A4[] = {4, 10, 11};
const int A5[] = {4, 10};
-const int N = sizeof(A) / sizeof(int);
-const int N1 = sizeof(A1) / sizeof(int);
-const int N2 = sizeof(A2) / sizeof(int);
-const int N3 = sizeof(A3) / sizeof(int);
-const int N4 = sizeof(A4) / sizeof(int);
-const int N5 = sizeof(A5) / sizeof(int);
+const unsigned N = sizeof(A) / sizeof(int);
+const unsigned N1 = sizeof(A1) / sizeof(int);
+const unsigned N2 = sizeof(A2) / sizeof(int);
+const unsigned N3 = sizeof(A3) / sizeof(int);
+const unsigned N4 = sizeof(A4) / sizeof(int);
+const unsigned N5 = sizeof(A5) / sizeof(int);
void
test01()
@@ -85,17 +85,17 @@ test02()
typedef deque_type::iterator iterator_type;
deque_type v, v1, v2, v3, v4, v5;
- for (int i = 0; i < N; ++i)
+ for (unsigned i = 0; i < N; ++i)
v.push_back(std::deque<int>(1, A[i]));
- for (int i = 0; i < N1; ++i)
+ for (unsigned i = 0; i < N1; ++i)
v1.push_back(std::deque<int>(1, A1[i]));
- for (int i = 0; i < N2; ++i)
+ for (unsigned i = 0; i < N2; ++i)
v2.push_back(std::deque<int>(1, A2[i]));
- for (int i = 0; i < N3; ++i)
+ for (unsigned i = 0; i < N3; ++i)
v3.push_back(std::deque<int>(1, A3[i]));
- for (int i = 0; i < N4; ++i)
+ for (unsigned i = 0; i < N4; ++i)
v4.push_back(std::deque<int>(1, A4[i]));
- for (int i = 0; i < N5; ++i)
+ for (unsigned i = 0; i < N5; ++i)
v5.push_back(std::deque<int>(1, A5[i]));
iterator_type it1 = v.erase(v.begin() + 1);
diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
index 19542d3999e..93ced1b9064 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
@@ -1,6 +1,6 @@
// 2005-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -32,14 +32,14 @@ const int A3[] = {-5, 0, 1, 2, 8, 9, 10, 11};
const int A4[] = {2, 8, 9, 10, 11};
const int A5[] = {2, 8, 10, 11};
const int A6[] = {2, 8, 10};
-const int N = sizeof(A) / sizeof(int);
-const int N0 = sizeof(A0) / sizeof(int);
-const int N1 = sizeof(A1) / sizeof(int);
-const int N2 = sizeof(A2) / sizeof(int);
-const int N3 = sizeof(A3) / sizeof(int);
-const int N4 = sizeof(A4) / sizeof(int);
-const int N5 = sizeof(A5) / sizeof(int);
-const int N6 = sizeof(A6) / sizeof(int);
+const unsigned N = sizeof(A) / sizeof(int);
+const unsigned N0 = sizeof(A0) / sizeof(int);
+const unsigned N1 = sizeof(A1) / sizeof(int);
+const unsigned N2 = sizeof(A2) / sizeof(int);
+const unsigned N3 = sizeof(A3) / sizeof(int);
+const unsigned N4 = sizeof(A4) / sizeof(int);
+const unsigned N5 = sizeof(A5) / sizeof(int);
+const unsigned N6 = sizeof(A6) / sizeof(int);
template<int Size>
class My_class
diff --git a/libstdc++-v3/testsuite/23_containers/map/operations/1.cc b/libstdc++-v3/testsuite/23_containers/map/operations/1.cc
index 8f27ab4c06e..35355380461 100644
--- a/libstdc++-v3/testsuite/23_containers/map/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -128,6 +128,7 @@ void test01()
VERIFY( pp0.second == irt1.first );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc b/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
index 8ee2f2847d1..b781ca2f947 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -127,6 +127,7 @@ void test01()
VERIFY( pp0.second == iter1 );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc b/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
index ffa386cfeb5..a37a0a1a637 100644
--- a/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -126,6 +126,7 @@ void test01()
VERIFY( pp0.second == iter1 );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/set/operations/1.cc b/libstdc++-v3/testsuite/23_containers/set/operations/1.cc
index fcc311381a1..b0e6dc507e0 100644
--- a/libstdc++-v3/testsuite/23_containers/set/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -127,6 +127,7 @@ void test01()
VERIFY( pp0.second == irt1.first );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
index 3724768d4a6..6d71b23ff30 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
@@ -39,8 +39,10 @@ void test01()
// Actually, vector<bool> is special, see libstdc++/31370.
vector<bool> vb;
typedef vector<bool>::difference_type difference_type;
+ typedef vector<bool>::size_type size_type;
VERIFY( vb.max_size()
- == (numeric_limits<difference_type>::max() - int(_S_word_bit) + 1) );
+ == size_type(numeric_limits<difference_type>::max()
+ - int(_S_word_bit) + 1) );
}
int main()
OpenPOWER on IntegriCloud