+2006-06-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/tr1/5_numerical_facilies: Move to...
+ * testsuite/tr1/5_numerical_facilities: ...this.
+
2006-06-06 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random: Trivial uglification fixes.
+++ /dev/null
-// { dg-do compile }
-//
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.5 Class template linear_congruential
-// 5.1.1 [1] Table 15
-
-#include <tr1/random>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- typedef discard_block
- <
- subtract_with_carry<long, (1 << 24), 10, 24>,
- 389, 24
- > test_type;
-
- typedef test_type::result_type result_type;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
-// 5.1.4.1 [4]
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- using namespace std::tr1;
-
- linear_congruential<unsigned long, 48271, 0, 2147483647> x;
- VERIFY( x.min() == 1 );
- VERIFY( x.max() == 2147483647-1 );
- VERIFY( x() == 48271 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
-// 5.1.1 Table 16 line 3 template ctor(gen)
-
-#include <ctime>
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-// a not untypical initialization function
-unsigned long
-gen()
-{
- return std::time(0);
-}
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- using namespace std::tr1;
-
- linear_congruential<unsigned long, 48271, 0, 2147483647> x(gen);
- VERIFY( x.min() == 1 );
- VERIFY( x.max() == 2147483647-1 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
-// 5.1.1 [4] para 2
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- unsigned long seed = 2;
- linear_congruential<unsigned long, 48271, 0, 2147483647> x(seed);
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
-// 5.1.1 [4] para 2
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- double seed = 2.0;
- linear_congruential<unsigned long, 48271, 0, 2147483647> x(seed);
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.1 Class template linear_congruential
-// 5.1 [3] Table 16
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- std::tr1::minstd_rand0 a;
- std::tr1::minstd_rand0 b;
- std::tr1::minstd_rand0 c(120);
-
- VERIFY( a == b );
- VERIFY( !(a == c) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.1 Class template linear_congruential
-// 5.1 [3] Table 16
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- std::tr1::minstd_rand0 a;
- std::tr1::minstd_rand0 b;
- std::tr1::minstd_rand0 c(120);
-
- VERIFY( !(a != b) );
- VERIFY( a != c );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.1 Class template linear_congruential
-// 5.1 [3] Table 16
-
-#include <sstream>
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- std::stringstream str;
- std::tr1::minstd_rand0 a;
- std::tr1::minstd_rand0 b;
-
- a(); // advance
- str << a;
-
- VERIFY( a != b );
-
- str >> b;
- VERIFY( a == b );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// { dg-do compile }
-// { dg-options "-D_GLIBCXX_CONCEPT_CHECKS" }
-// { dg-error "not a valid type" "" { target *-*-* } 37 }
-// { dg-error "invalid type" "" { target *-*-* } 37 }
-
-// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
-// 5.1.4.1 [4]
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- linear_congruential<double, 48271, 0, 2147483647> x;
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-do compile }
-//
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.1 Class template linear_congruential
-// 5.1.1 [1] Table 15
-
-#include <tr1/random>
-
-void
-test01()
-{
- typedef std::tr1::linear_congruential<unsigned long, 2, 0, 4> test_type;
-
- typedef test_type::result_type result_type;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.2 class template mersenne_twister [tr.rand.eng.mers]
-// 5.1.1 Table 16 line 1 default ctor
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- using namespace std::tr1;
- mersenne_twister<
- unsigned long, 32, 624, 397, 31,
- 0x9908b0dful, 11, 7,
- 0x9d2c5680ul, 15,
- 0xefc60000ul, 18> x;
-
- VERIFY( x.min() == 0 );
- VERIFY( x.max() == 4294967295ul );
- VERIFY( x() == 3499211612ul );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.2 class template mersenne_twister [tr.rand.eng.mers]
-// 5.1.1 Table 16 line 3 Gen ctor
-
-#include <ctime>
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-// a not untypical initialization function
-unsigned long
-gen()
-{
- return std::time(0);
-}
-
-void
-test01()
-{
- using namespace std::tr1;
-
- mersenne_twister<
- unsigned long, 32, 624, 397, 31,
- 0x9908b0dful, 11, 7,
- 0x9d2c5680ul, 15,
- 0xefc60000ul, 18> x(gen);
-
- VERIFY( x.min() == 0 );
- VERIFY( x.max() == 4294967295ul );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.2 class template mersenne_twister [tr.rand.eng.mers]
-// 5.1.1 Table 16 line 2 seed ctor
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- unsigned long seed = 2;
- mersenne_twister<
- unsigned long, 32, 624, 397, 31,
- 0x9908b0dful, 11, 7,
- 0x9d2c5680ul, 15,
- 0xefc60000ul, 18> x(seed);
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.2 class template mersenne_twister [tr.rand.eng.mers]
-// 5.1.1 Table 16 line 2 seed ctor
-// 5.1.1 (4) point 2: Gen is a fundamental type.
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- double seed = 2.0;
- mersenne_twister<
- unsigned long, 32, 624, 397, 31,
- 0x9908b0dful, 11, 7,
- 0x9d2c5680ul, 15,
- 0xefc60000ul, 18> x(seed);
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-do compile }
-//
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.2 Class template mersenne_twister
-// 5.1.1 [1] Table 15
-
-#include <tr1/random>
-
-void
-test01()
-{
- typedef std::tr1::mersenne_twister<unsigned long,
- 32, 624, 397, 31,
- 0x9908b0df, 11, 7,
- 0x9d2c5680, 15,
- 0xefc60000, 18> test_type;
-
- typedef test_type::result_type result_type;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.5 Engines with predefined parameters
-// 5.1.5 [1]
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- std::tr1::minstd_rand a;
- for (int i = 0; i < 9999; ++i)
- a();
-
- VERIFY( a() == 399268537 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.5 Engines with predefined parameters
-// 5.1.5 [1]
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- std::tr1::minstd_rand0 a;
- for (int i = 0; i < 9999; ++i)
- a();
-
- VERIFY( a() == 1043618065 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.5 Engines with predefined parameters
-// 5.1.5 [2]
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- std::tr1::mt19937 a;
- for (int i = 0; i < 9999; ++i)
- a();
-
- VERIFY( a() == 4123659995ul );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.5 Engines with predefined parameters
-// 5.1.5 [3]
-
-#include <iostream>
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- std::tr1::ranlux3 a;
- for (int i = 0; i < 9999; ++i)
- a();
-
- VERIFY( a() == 5957620 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.5 Engines with predefined parameters
-// 5.1.5 [3]
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- std::tr1::ranlux4 a;
- for (int i = 0; i < 9999; ++i)
- a();
-
- VERIFY( a() == 8587295 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
-// 5.1.1 Table 16 line 1 default ctor
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- using namespace std::tr1;
-
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> x;
- VERIFY( x.min() == 0 );
- VERIFY( x.max() == ((1<<24)-1) );
- VERIFY( x() == 15039276 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
-// 5.1.1 Table 16 line 3 Gen ctor
-
-#include <ctime>
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-// a not untypical initialization function
-unsigned long
-gen()
-{
- return std::time(0);
-}
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- using namespace std::tr1;
-
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> x(gen);
- VERIFY( x.min() == 0 );
- VERIFY( x.max() == ((1 << 24) - 1) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
-// 5.1.1 Table 16 line 2 seed ctor
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- unsigned long seed = 2;
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> x(seed);
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
-// 5.1.1 Table 16 line 2 seed ctor
-// 5.1.1 (4) point 2: Gen is a fundamental type.
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- double seed = 2.0;
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> x(seed);
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
-// 5.1.1 Table 16
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- using namespace std::tr1;
-
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> u;
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> v;
-
- VERIFY( u == v );
-
- for (int i = 0; i < 100; ++i)
- {
- u();
- v();
- }
- VERIFY( u == v );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
-// 5.1.1 Table 16
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- using namespace std::tr1;
-
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> u(1);
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> v(2);
-
- VERIFY( u != v );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
-// 5.1.1 Table 16
-
-#include <sstream>
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::subtract_with_carry;
-
- std::stringstream str;
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> u;
- subtract_with_carry<unsigned long, (1 << 24), 10, 24> v;
-
- u(); // advance
- str << u;
-
- VERIFY( u != v );
-
- str >> v;
- VERIFY( u == v );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-do compile }
-//
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.3 Class template subtract_with_carry
-// 5.1.1 [1] Table 15
-
-#include <tr1/random>
-
-void
-test01()
-{
- typedef std::tr1::subtract_with_carry<long, 8, 2, 4> test_type;
-
- typedef test_type::result_type result_type;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.7.1 class template uniform_int
-// 5.1.7.1 [2] constructors and member functions
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- using namespace std::tr1;
-
- uniform_int<int> u;
- VERIFY( u.min() == 0 );
- VERIFY( u.max() == 9 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.7.1 class template uniform_int
-// 5.1.7.1 [2] constructors and member functions
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- using namespace std::tr1;
-
- uniform_int<int> u(1, 20);
- VERIFY( u.min() == 1 );
- VERIFY( u.max() == 20 );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// { dg-do run { xfail *-*-* } }
-// { dg-options "-D_GLIBCXX_DEBUG" }
-
-// 5.1.7.1 class template uniform_int
-// 5.1.7.1 [2] constructors and member functions
-
-#include <tr1/random>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- uniform_int<int> u(20, 1);
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// { dg-do compile }
-//
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.7.1 Class template uniform_int
-// 5.1.1 [7] Table 17
-
-#include <tr1/random>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- typedef uniform_int<int> test_type;
-
- typedef test_type::input_type input_type;
- typedef test_type::result_type result_type;
-}
+++ /dev/null
-// { dg-do compile }
-//
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.7.6 Class template uniform_int [tr.rand.dist.runif]
-// 5.1.1 [7] Table 17
-
-#include <tr1/random>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- typedef uniform_real<double> test_type;
-
- typedef test_type::input_type input_type;
- typedef test_type::result_type result_type;
-}
+++ /dev/null
-// { dg-do compile }
-//
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.3 class template variate_generator
-
-#include <tr1/random>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- typedef variate_generator
- <
- linear_congruential<unsigned long, 16807 , 0 , 2147483647>,
- uniform_int<int>
- > test_type;
-
- typedef test_type::engine_type engine_type;
- typedef test_type::engine_value_type engine_value_type;
- typedef test_type::distribution_type distribution_type;
- typedef test_type::result_type result_type;
-}
+++ /dev/null
-// { dg-do compile }
-//
-// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
-//
-// Copyright (C) 2006 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.
-
-// 5.1.4.6 Class template xor_combine
-// 5.1.1 [1] Table 15
-
-#include <tr1/random>
-
-void
-test01()
-{
- using namespace std::tr1;
-
- typedef xor_combine
- <
- subtract_with_carry<long, (1 << 24), 10, 24>, 1,
- linear_congruential<unsigned long, 16807, 0, 2147483647>, 2
- > test_type;
-
- typedef test_type::result_type result_type;
-}
--- /dev/null
+// { dg-do compile }
+//
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.5 Class template linear_congruential
+// 5.1.1 [1] Table 15
+
+#include <tr1/random>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ typedef discard_block
+ <
+ subtract_with_carry<long, (1 << 24), 10, 24>,
+ 389, 24
+ > test_type;
+
+ typedef test_type::result_type result_type;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
+// 5.1.4.1 [4]
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::tr1;
+
+ linear_congruential<unsigned long, 48271, 0, 2147483647> x;
+ VERIFY( x.min() == 1 );
+ VERIFY( x.max() == 2147483647-1 );
+ VERIFY( x() == 48271 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
+// 5.1.1 Table 16 line 3 template ctor(gen)
+
+#include <ctime>
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+// a not untypical initialization function
+unsigned long
+gen()
+{
+ return std::time(0);
+}
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::tr1;
+
+ linear_congruential<unsigned long, 48271, 0, 2147483647> x(gen);
+ VERIFY( x.min() == 1 );
+ VERIFY( x.max() == 2147483647-1 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
+// 5.1.1 [4] para 2
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ unsigned long seed = 2;
+ linear_congruential<unsigned long, 48271, 0, 2147483647> x(seed);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
+// 5.1.1 [4] para 2
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ double seed = 2.0;
+ linear_congruential<unsigned long, 48271, 0, 2147483647> x(seed);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.1 Class template linear_congruential
+// 5.1 [3] Table 16
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::minstd_rand0 a;
+ std::tr1::minstd_rand0 b;
+ std::tr1::minstd_rand0 c(120);
+
+ VERIFY( a == b );
+ VERIFY( !(a == c) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.1 Class template linear_congruential
+// 5.1 [3] Table 16
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::minstd_rand0 a;
+ std::tr1::minstd_rand0 b;
+ std::tr1::minstd_rand0 c(120);
+
+ VERIFY( !(a != b) );
+ VERIFY( a != c );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.1 Class template linear_congruential
+// 5.1 [3] Table 16
+
+#include <sstream>
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::stringstream str;
+ std::tr1::minstd_rand0 a;
+ std::tr1::minstd_rand0 b;
+
+ a(); // advance
+ str << a;
+
+ VERIFY( a != b );
+
+ str >> b;
+ VERIFY( a == b );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// { dg-do compile }
+// { dg-options "-D_GLIBCXX_CONCEPT_CHECKS" }
+// { dg-error "not a valid type" "" { target *-*-* } 37 }
+// { dg-error "invalid type" "" { target *-*-* } 37 }
+
+// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
+// 5.1.4.1 [4]
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ linear_congruential<double, 48271, 0, 2147483647> x;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+//
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.1 Class template linear_congruential
+// 5.1.1 [1] Table 15
+
+#include <tr1/random>
+
+void
+test01()
+{
+ typedef std::tr1::linear_congruential<unsigned long, 2, 0, 4> test_type;
+
+ typedef test_type::result_type result_type;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.2 class template mersenne_twister [tr.rand.eng.mers]
+// 5.1.1 Table 16 line 1 default ctor
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ using namespace std::tr1;
+ mersenne_twister<
+ unsigned long, 32, 624, 397, 31,
+ 0x9908b0dful, 11, 7,
+ 0x9d2c5680ul, 15,
+ 0xefc60000ul, 18> x;
+
+ VERIFY( x.min() == 0 );
+ VERIFY( x.max() == 4294967295ul );
+ VERIFY( x() == 3499211612ul );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.2 class template mersenne_twister [tr.rand.eng.mers]
+// 5.1.1 Table 16 line 3 Gen ctor
+
+#include <ctime>
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+// a not untypical initialization function
+unsigned long
+gen()
+{
+ return std::time(0);
+}
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ mersenne_twister<
+ unsigned long, 32, 624, 397, 31,
+ 0x9908b0dful, 11, 7,
+ 0x9d2c5680ul, 15,
+ 0xefc60000ul, 18> x(gen);
+
+ VERIFY( x.min() == 0 );
+ VERIFY( x.max() == 4294967295ul );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.2 class template mersenne_twister [tr.rand.eng.mers]
+// 5.1.1 Table 16 line 2 seed ctor
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ unsigned long seed = 2;
+ mersenne_twister<
+ unsigned long, 32, 624, 397, 31,
+ 0x9908b0dful, 11, 7,
+ 0x9d2c5680ul, 15,
+ 0xefc60000ul, 18> x(seed);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.2 class template mersenne_twister [tr.rand.eng.mers]
+// 5.1.1 Table 16 line 2 seed ctor
+// 5.1.1 (4) point 2: Gen is a fundamental type.
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ double seed = 2.0;
+ mersenne_twister<
+ unsigned long, 32, 624, 397, 31,
+ 0x9908b0dful, 11, 7,
+ 0x9d2c5680ul, 15,
+ 0xefc60000ul, 18> x(seed);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+//
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.2 Class template mersenne_twister
+// 5.1.1 [1] Table 15
+
+#include <tr1/random>
+
+void
+test01()
+{
+ typedef std::tr1::mersenne_twister<unsigned long,
+ 32, 624, 397, 31,
+ 0x9908b0df, 11, 7,
+ 0x9d2c5680, 15,
+ 0xefc60000, 18> test_type;
+
+ typedef test_type::result_type result_type;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.5 Engines with predefined parameters
+// 5.1.5 [1]
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::minstd_rand a;
+ for (int i = 0; i < 9999; ++i)
+ a();
+
+ VERIFY( a() == 399268537 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.5 Engines with predefined parameters
+// 5.1.5 [1]
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::minstd_rand0 a;
+ for (int i = 0; i < 9999; ++i)
+ a();
+
+ VERIFY( a() == 1043618065 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.5 Engines with predefined parameters
+// 5.1.5 [2]
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::mt19937 a;
+ for (int i = 0; i < 9999; ++i)
+ a();
+
+ VERIFY( a() == 4123659995ul );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.5 Engines with predefined parameters
+// 5.1.5 [3]
+
+#include <iostream>
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::ranlux3 a;
+ for (int i = 0; i < 9999; ++i)
+ a();
+
+ VERIFY( a() == 5957620 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.5 Engines with predefined parameters
+// 5.1.5 [3]
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::ranlux4 a;
+ for (int i = 0; i < 9999; ++i)
+ a();
+
+ VERIFY( a() == 8587295 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
+// 5.1.1 Table 16 line 1 default ctor
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::tr1;
+
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> x;
+ VERIFY( x.min() == 0 );
+ VERIFY( x.max() == ((1<<24)-1) );
+ VERIFY( x() == 15039276 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
+// 5.1.1 Table 16 line 3 Gen ctor
+
+#include <ctime>
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+// a not untypical initialization function
+unsigned long
+gen()
+{
+ return std::time(0);
+}
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::tr1;
+
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> x(gen);
+ VERIFY( x.min() == 0 );
+ VERIFY( x.max() == ((1 << 24) - 1) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
+// 5.1.1 Table 16 line 2 seed ctor
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ unsigned long seed = 2;
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> x(seed);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
+// 5.1.1 Table 16 line 2 seed ctor
+// 5.1.1 (4) point 2: Gen is a fundamental type.
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ double seed = 2.0;
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> x(seed);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
+// 5.1.1 Table 16
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::tr1;
+
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> u;
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> v;
+
+ VERIFY( u == v );
+
+ for (int i = 0; i < 100; ++i)
+ {
+ u();
+ v();
+ }
+ VERIFY( u == v );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
+// 5.1.1 Table 16
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::tr1;
+
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> u(1);
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> v(2);
+
+ VERIFY( u != v );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
+// 5.1.1 Table 16
+
+#include <sstream>
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::subtract_with_carry;
+
+ std::stringstream str;
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> u;
+ subtract_with_carry<unsigned long, (1 << 24), 10, 24> v;
+
+ u(); // advance
+ str << u;
+
+ VERIFY( u != v );
+
+ str >> v;
+ VERIFY( u == v );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+//
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.3 Class template subtract_with_carry
+// 5.1.1 [1] Table 15
+
+#include <tr1/random>
+
+void
+test01()
+{
+ typedef std::tr1::subtract_with_carry<long, 8, 2, 4> test_type;
+
+ typedef test_type::result_type result_type;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.7.1 class template uniform_int
+// 5.1.7.1 [2] constructors and member functions
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::tr1;
+
+ uniform_int<int> u;
+ VERIFY( u.min() == 0 );
+ VERIFY( u.max() == 9 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.7.1 class template uniform_int
+// 5.1.7.1 [2] constructors and member functions
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::tr1;
+
+ uniform_int<int> u(1, 20);
+ VERIFY( u.min() == 1 );
+ VERIFY( u.max() == 20 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// { dg-do run { xfail *-*-* } }
+// { dg-options "-D_GLIBCXX_DEBUG" }
+
+// 5.1.7.1 class template uniform_int
+// 5.1.7.1 [2] constructors and member functions
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ uniform_int<int> u(20, 1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+//
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.7.1 Class template uniform_int
+// 5.1.1 [7] Table 17
+
+#include <tr1/random>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ typedef uniform_int<int> test_type;
+
+ typedef test_type::input_type input_type;
+ typedef test_type::result_type result_type;
+}
--- /dev/null
+// { dg-do compile }
+//
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.7.6 Class template uniform_int [tr.rand.dist.runif]
+// 5.1.1 [7] Table 17
+
+#include <tr1/random>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ typedef uniform_real<double> test_type;
+
+ typedef test_type::input_type input_type;
+ typedef test_type::result_type result_type;
+}
--- /dev/null
+// { dg-do compile }
+//
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.3 class template variate_generator
+
+#include <tr1/random>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ typedef variate_generator
+ <
+ linear_congruential<unsigned long, 16807 , 0 , 2147483647>,
+ uniform_int<int>
+ > test_type;
+
+ typedef test_type::engine_type engine_type;
+ typedef test_type::engine_value_type engine_value_type;
+ typedef test_type::distribution_type distribution_type;
+ typedef test_type::result_type result_type;
+}
--- /dev/null
+// { dg-do compile }
+//
+// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
+//
+// Copyright (C) 2006 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.
+
+// 5.1.4.6 Class template xor_combine
+// 5.1.1 [1] Table 15
+
+#include <tr1/random>
+
+void
+test01()
+{
+ using namespace std::tr1;
+
+ typedef xor_combine
+ <
+ subtract_with_carry<long, (1 << 24), 10, 24>, 1,
+ linear_congruential<unsigned long, 16807, 0, 2147483647>, 2
+ > test_type;
+
+ typedef test_type::result_type result_type;
+}