From: paolo Date: Mon, 24 Dec 2007 16:25:49 +0000 (+0000) Subject: 2007-12-24 Paolo Carlini X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=4de6f9c38bf9833ca961bd7a7d870d88c38a7d3c 2007-12-24 Paolo Carlini * testsuite/20_util/tuple/cons/big_tuples.cc: New. * testsuite/20_util/tuple/cons/constructor.cc: Likewise. * testsuite/20_util/tuple/cons/assignment.cc: Likewise. * testsuite/20_util/tuple/tuple_element.cc: Likewise. * testsuite/20_util/tuple/tuple_size.cc: Likewise. * testsuite/20_util/tuple/comparison_operators/comparisons.cc: Likewise. * testsuite/20_util/tuple/element_access/get.cc: Likewise. * testsuite/20_util/tuple/creation_functions/23978.cc: Likewise. * testsuite/20_util/tuple/creation_functions/tie.cc: Likewise. * testsuite/20_util/tuple/creation_functions/make_tuple.cc: Likewise. * testsuite/20_util/tuple/requirements/explicit_instantiation.cc: Fix header file and namespace. * testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: Minor tweaks. * testsuite/tr1/6_containers/tuple/cons/constructor.cc: Likewise. * testsuite/tr1/6_containers/tuple/cons/assignment.cc: Likewise. * testsuite/tr1/6_containers/tuple/tuple_element.cc: Likewise. * testsuite/tr1/6_containers/tuple/tuple_size.cc: Likewise. * testsuite/tr1/6_containers/tuple/comparison_operators/ comparisons.cc: Likewise. * testsuite/tr1/6_containers/tuple/element_access/get.cc: Likewise. * testsuite/tr1/6_containers/tuple/creation_functions/tie.cc: Likewise. * testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131159 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4a342a10045..f88476a4198 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,32 @@ +2007-12-24 Paolo Carlini + + * testsuite/20_util/tuple/cons/big_tuples.cc: New. + * testsuite/20_util/tuple/cons/constructor.cc: Likewise. + * testsuite/20_util/tuple/cons/assignment.cc: Likewise. + * testsuite/20_util/tuple/tuple_element.cc: Likewise. + * testsuite/20_util/tuple/tuple_size.cc: Likewise. + * testsuite/20_util/tuple/comparison_operators/comparisons.cc: + Likewise. + * testsuite/20_util/tuple/element_access/get.cc: Likewise. + * testsuite/20_util/tuple/creation_functions/23978.cc: Likewise. + * testsuite/20_util/tuple/creation_functions/tie.cc: Likewise. + * testsuite/20_util/tuple/creation_functions/make_tuple.cc: Likewise. + + * testsuite/20_util/tuple/requirements/explicit_instantiation.cc: + Fix header file and namespace. + + * testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: Minor tweaks. + * testsuite/tr1/6_containers/tuple/cons/constructor.cc: Likewise. + * testsuite/tr1/6_containers/tuple/cons/assignment.cc: Likewise. + * testsuite/tr1/6_containers/tuple/tuple_element.cc: Likewise. + * testsuite/tr1/6_containers/tuple/tuple_size.cc: Likewise. + * testsuite/tr1/6_containers/tuple/comparison_operators/ + comparisons.cc: Likewise. + * testsuite/tr1/6_containers/tuple/element_access/get.cc: Likewise. + * testsuite/tr1/6_containers/tuple/creation_functions/tie.cc: Likewise. + * testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc: + Likewise. + 2007-12-24 Jonathan Wakely * testsuite/tr1/2_general_utilities/shared_ptr/thread/ diff --git a/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc b/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc new file mode 100644 index 00000000000..847785cb02b --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc @@ -0,0 +1,50 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include +#include + +using namespace std; + +bool test __attribute__((unused)) = true; + +#define TEST1(x) VERIFY( x == x && !(x != x) && x <= x && !(x < x) ) + +int +main() +{ + int i=0; + int j=0; + int k=2; + tuple a(0, 0, 0); + tuple b(0, 0, 1); + tuple c(i,j,k); + tuple d(c); + TEST1(a); + TEST1(b); + TEST1(c); + TEST1(d); + VERIFY(!(a > a) && !(b > b)); + VERIFY(a >= a && b >= b); + VERIFY(a < b && !(b < a) && a <= b && !(b <= a)); + VERIFY(b > a && !(a > b) && b >= a && !(a >= b)); +} diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc new file mode 100644 index 00000000000..86defaccf16 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc @@ -0,0 +1,53 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include +#include + +using namespace std; + +int +main() +{ + bool test __attribute__((unused)) = true; + + tuple<> ta; + tuple<> tb; + ta = tb; + + tuple tc(1); + tuple td(0); + td = tc; + VERIFY(get<0>(td) == 1); + + int i=0; + tuple te(i); + te = tc; + VERIFY(i == 1); + + tuple tf(tc); + + get<0>(tc) = 2; + VERIFY(get<0>(tf) == 2); + tuple tg; + tg = tc; +} diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc new file mode 100644 index 00000000000..938e4cb48d4 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc @@ -0,0 +1,105 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include +#include + +using namespace std; + +// A simple class without conversions to check some things +struct foo +{ }; + +void +test_constructors() +{ + bool test __attribute__((unused)) = true; + + int x1=0,x2=0; + const int &z1=x1; + + // Test empty constructor + tuple<> ta; + tuple tb; + // Test construction from values + tuple tc(x1,x2); + tuple td(x1,x2); + tuple te(z1); + x1=1; + x2=1; + VERIFY(get<0>(td) == 0 && get<1>(td) == 1 && get<0>(te) == 1); + + // Test identical tuple copy constructor + tuple tf(tc); + tuple tg(td); + tuple th(te); + // Test different tuple copy constructor + tuple ti(tc); + tuple tj(td); + // Test constructing from a pair + pair pair1(1,1); + const pair pair2(pair1); + tuple tl(pair1); + tuple tm(pair1); + tuple tn(pair2); + tuple to(pair2); +} + +int +main(void) +{ + //test construction + typedef tuple type1; + type1 a(0, 0, 0, 0, 0, 0, 0, 0, 0, 1); + type1 b(0, 0, 0, 0, 0, 0, 0, 0, 0, 2); + type1 c(a); + typedef tuple type2; + type2 d(0, 0, 0, 0, 0, 0, 0, 0, 0, 3); + type1 e(d); + typedef tuple type3; + // get + VERIFY(get<9>(a)==1 && get<9>(b)==2); + // comparisons + VERIFY(a==a && !(a!=a) && a<=a && a>=a && !(aa)); + VERIFY(!(a==b) && a!=b && a<=b && a=b) && !(a>b)); + //tie + { + int i = 0; + tie(ignore, ignore, ignore, ignore, ignore, ignore, ignore, ignore, + ignore, i) = a; + VERIFY(i == 1); + } + //test_assignment + a=d; + a=b; + //make_tuple + make_tuple(0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + + //tuple_size + VERIFY(tuple_size::value == 10); + //tuple_element + { + foo q1; + tuple_element<0,type3>::type q2(q1); + tuple_element<9,type3>::type q3(q1); + } +} diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc new file mode 100644 index 00000000000..8440413d930 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc @@ -0,0 +1,65 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include +#include + +using namespace std; + +int +main() +{ + bool test __attribute__((unused)) = true; + + int x1=0,x2=0; + const int &z1=x1; + + // Test empty constructor + tuple<> ta; + tuple tb; + // Test construction from values + tuple tc(x1,x2); + tuple td(x1,x2); + tuple te(z1); + x1=1; + x2=1; + VERIFY(get<0>(td) == 0 && get<1>(td) == 1 && get<0>(te) == 1); + + // Test identical tuple copy constructor + tuple tf(tc); + tuple tg(td); + tuple th(te); + // Test different tuple copy constructor + tuple ti(tc); + tuple tj(td); + //tuple tk(tc); + tuple tl(tc); + tuple tm(tl); + // Test constructing from a pair + pair pair1(1,1); + const pair pair2(pair1); + tuple tn(pair1); + tuple to(pair1); + tuple tp(pair2); + tuple tq(pair2); + return 0; +} diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc new file mode 100644 index 00000000000..edb4aef61b0 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc @@ -0,0 +1,46 @@ +// { dg-options "-std=gnu++0x" } +// +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include +#include +#include + +using namespace std; + +// libstdc++/23978 +void test01() +{ + bool test __attribute__((unused)) = true; + + pair p(1, 2); + int x = 0; + int y = 0; + tie(x, y) = p; + VERIFY( x == 1 && y == 2 ); +} + +int +main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc new file mode 100644 index 00000000000..a6eba6d4154 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc @@ -0,0 +1,38 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include +#include +#include + +using namespace std; + +int +main() +{ + bool test __attribute__((unused)) = true; + + int i=0; + make_tuple(1,2,4.0); + make_tuple(ref(i)) = tuple(1); + VERIFY(i == 1); +} diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc new file mode 100644 index 00000000000..e7f5c056e4e --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc @@ -0,0 +1,43 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include +#include + +using namespace std; + +int +main() +{ + bool test __attribute__((unused)) = true; + + int x1 = 0; + int x2 = 0; + int y1 = 0; + int y2 = 0; + tuple ta(1,1); + tuple tc(x1,x2); + tie(y1,y2)=ta; + VERIFY(y1 == 1 && y2 == 1); + tie(y1,y2)=tc; + VERIFY(y1 == 0 && y2 == 0); +} diff --git a/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc b/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc new file mode 100644 index 00000000000..32015ee7da6 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc @@ -0,0 +1,45 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include +#include + +using namespace std; + +int +main() +{ + bool test __attribute__((unused)) = true; + + int j=1; + const int k=2; + tuple a(0,j,k); + const tuple b(1,j,k); + VERIFY(get<0>(a)==0 && get<1>(a)==1 && get<2>(a)==2); + get<0>(a)=3; + get<1>(a)=4; + VERIFY(get<0>(a)==3 && get<1>(a)==4); + VERIFY(j==4); + get<1>(b)=5; + VERIFY(get<0>(b)==1 && get<1>(b)==5 && get<2>(b)==2); + VERIFY(j==5); +} diff --git a/libstdc++-v3/testsuite/20_util/tuple/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/tuple/requirements/explicit_instantiation.cc index 55afcc86fdb..29b886d1266 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/requirements/explicit_instantiation.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/requirements/explicit_instantiation.cc @@ -28,6 +28,6 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#include +#include -template class std::tr1::tuple; +template class std::tuple; diff --git a/libstdc++-v3/testsuite/20_util/tuple/tuple_element.cc b/libstdc++-v3/testsuite/20_util/tuple/tuple_element.cc new file mode 100644 index 00000000000..1b78a5ca2bb --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/tuple_element.cc @@ -0,0 +1,38 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include + +using namespace std; + +struct foo +{ }; + +int +main() +{ + // As foo isn't constructible from anything else, this + // lets us check if type is returning foo when it should + foo q1; + tuple_element<0,tuple >::type q2(q1); + tuple_element<2,tuple >::type q3(q1); +} diff --git a/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc b/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc new file mode 100644 index 00000000000..f5f398ce0a1 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc @@ -0,0 +1,39 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// Tuple + +#include +#include + +using namespace std; + +int +main() +{ + bool test __attribute__((unused)) = true; + + VERIFY(tuple_size >::value == 0); + VERIFY(tuple_size >::value == 1); + VERIFY(tuple_size >::value == 1); + typedef tuple test_tuple1; + VERIFY(tuple_size::value == 3); + VERIFY(tuple_size > >::value == 1); +} diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc index f22d975c86b..7eee7a8d12d 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc @@ -1,6 +1,6 @@ // 2004-09-23 Chris Jefferson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 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 @@ -25,6 +25,8 @@ using namespace std::tr1; +bool test __attribute__((unused)) = true; + #define TEST1(x) VERIFY( x == x && !(x != x) && x <= x && !(x < x) ) int diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/assignment.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/assignment.cc index 6207b41f9df..973b5f0ce31 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/assignment.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/assignment.cc @@ -1,6 +1,6 @@ // 2004-09-23 Chris Jefferson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 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 @@ -28,6 +28,8 @@ using namespace std::tr1; int main() { + bool test __attribute__((unused)) = true; + tuple<> ta; tuple<> tb; ta = tb; diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc index a23ad8dbc74..2af47e5bd17 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc @@ -1,6 +1,6 @@ // 2004-09-23 Chris Jefferson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 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 @@ -33,6 +33,8 @@ struct foo void test_constructors() { + bool test __attribute__((unused)) = true; + int x1=0,x2=0; const int &z1=x1; diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc index 89e9a113ffa..de34ba44809 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc @@ -1,6 +1,6 @@ // 2004-09-23 Chris Jefferson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 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,6 +29,8 @@ using std::pair; int main() { + bool test __attribute__((unused)) = true; + int x1=0,x2=0; const int &z1=x1; diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc index ca69be21f0e..9a0fc6f6dae 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc @@ -29,6 +29,8 @@ using namespace std::tr1; int main() { + bool test __attribute__((unused)) = true; + int i=0; make_tuple(1,2,4.0); make_tuple(ref(i)) = tuple(1); diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc index ea63a5d5c6a..d8389be410d 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc @@ -1,6 +1,6 @@ // 2004-09-23 Chris Jefferson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 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 @@ -28,6 +28,8 @@ using namespace std::tr1; int main() { + bool test __attribute__((unused)) = true; + int x1 = 0; int x2 = 0; int y1 = 0; diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/element_access/get.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/element_access/get.cc index 85ec6cb10dc..5cfda148634 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/element_access/get.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/element_access/get.cc @@ -1,6 +1,6 @@ // 2004-09-23 Chris Jefferson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 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 @@ -28,6 +28,8 @@ using namespace std::tr1; int main() { + bool test __attribute__((unused)) = true; + int j=1; const int k=2; tuple a(0,j,k); diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_element.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_element.cc index 44a93171e85..6178e567699 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_element.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_element.cc @@ -1,6 +1,6 @@ // 2004-09-23 Chris Jefferson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 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 @@ -31,7 +31,7 @@ struct foo int main() { - // As foo isn't constructable from anything else, this + // As foo isn't constructible from anything else, this // lets us check if type is returning foo when it should foo q1; tuple_element<0,tuple >::type q2(q1); diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_size.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_size.cc index 967cb43d95c..73389373b26 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_size.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_size.cc @@ -1,6 +1,6 @@ // 2004-09-23 Chris Jefferson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 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 @@ -28,6 +28,8 @@ using namespace std::tr1; int main() { + bool test __attribute__((unused)) = true; + VERIFY(tuple_size >::value == 0); VERIFY(tuple_size >::value == 1); VERIFY(tuple_size >::value == 1);