From a803975d9c048465bb1e314b9b65eda45170cdf9 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 7 Aug 2013 11:41:30 +0000 Subject: re PR libstdc++/58098 (wrong return value of normal_distribution::min()) 2013-08-07 Paolo Carlini PR libstdc++/58098 * include/bits/random.h (cauchy_distribution<>::min, extreme_value_distribution<>::min, normal_distribution<>::min, student_t_distribution<>::min): Fix. * include/ext/random (normal_mv_distribution<>::min): Likewise. * testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc: Adjust. testsuite/26_numerics/random/cauchy_distribution/cons/default.cc: Likewise. * testsuite/26_numerics/random/extreme_value_distribution/cons/ parms.cc: Likewise. testsuite/26_numerics/random/extreme_value_distribution/cons/ default.cc: Likewise. * testsuite/26_numerics/random/normal_distribution/cons/parms.cc: Likewise. * testsuite/26_numerics/random/normal_distribution/cons/default.cc: Likewise. * testsuite/26_numerics/random/student_t_distribution/cons/parms.cc: Likewise. * testsuite/26_numerics/random/student_t_distribution/cons/default.cc: Likewise. * testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise. * testsuite/ext/random/normal_mv_distribution/cons/default.cc: Likewise. * testsuite/26_numerics/random/exponential_distribution/cons/parms.cc: Minor tweak. * testsuite/26_numerics/random/exponential_distribution/cons/default.cc: Likewise. * testsuite/ext/von_mises_distribution/*: Move to... * testsuite/ext/random/von_mises_distribution/*: ... here. * testsuite/ext/triangular_distribution/*: Move to... * testsuite/ext/random/triangular_distribution/*: ... here. From-SVN: r201562 --- libstdc++-v3/ChangeLog | 36 ++++++++++++++++++ libstdc++-v3/include/bits/random.h | 8 ++-- libstdc++-v3/include/ext/random | 2 +- .../random/cauchy_distribution/cons/default.cc | 2 +- .../random/cauchy_distribution/cons/parms.cc | 2 +- .../exponential_distribution/cons/default.cc | 2 +- .../random/exponential_distribution/cons/parms.cc | 2 +- .../extreme_value_distribution/cons/default.cc | 2 +- .../extreme_value_distribution/cons/parms.cc | 2 +- .../random/normal_distribution/cons/default.cc | 2 +- .../random/normal_distribution/cons/parms.cc | 2 +- .../random/student_t_distribution/cons/default.cc | 2 +- .../random/student_t_distribution/cons/parms.cc | 2 +- .../random/normal_mv_distribution/cons/default.cc | 4 +- .../random/normal_mv_distribution/cons/parms.cc | 4 +- .../random/triangular_distribution/cons/default.cc | 44 ++++++++++++++++++++++ .../random/triangular_distribution/cons/parms.cc | 44 ++++++++++++++++++++++ .../triangular_distribution/operators/equal.cc | 42 +++++++++++++++++++++ .../triangular_distribution/operators/inequal.cc | 42 +++++++++++++++++++++ .../triangular_distribution/operators/serialize.cc | 44 ++++++++++++++++++++++ .../requirements/explicit_instantiation/1.cc | 26 +++++++++++++ .../requirements/typedefs.cc | 34 +++++++++++++++++ .../random/von_mises_distribution/cons/default.cc | 43 +++++++++++++++++++++ .../random/von_mises_distribution/cons/parms.cc | 43 +++++++++++++++++++++ .../von_mises_distribution/operators/equal.cc | 42 +++++++++++++++++++++ .../von_mises_distribution/operators/inequal.cc | 42 +++++++++++++++++++++ .../von_mises_distribution/operators/serialize.cc | 44 ++++++++++++++++++++++ .../requirements/explicit_instantiation/1.cc | 26 +++++++++++++ .../requirements/typedefs.cc | 34 +++++++++++++++++ .../ext/triangular_distribution/cons/default.cc | 44 ---------------------- .../ext/triangular_distribution/cons/parms.cc | 44 ---------------------- .../ext/triangular_distribution/operators/equal.cc | 42 --------------------- .../triangular_distribution/operators/inequal.cc | 42 --------------------- .../triangular_distribution/operators/serialize.cc | 44 ---------------------- .../requirements/explicit_instantiation/1.cc | 26 ------------- .../requirements/typedefs.cc | 34 ----------------- .../ext/von_mises_distribution/cons/default.cc | 43 --------------------- .../ext/von_mises_distribution/cons/parms.cc | 43 --------------------- .../ext/von_mises_distribution/operators/equal.cc | 42 --------------------- .../von_mises_distribution/operators/inequal.cc | 42 --------------------- .../von_mises_distribution/operators/serialize.cc | 44 ---------------------- .../requirements/explicit_instantiation/1.cc | 26 ------------- .../requirements/typedefs.cc | 34 ----------------- 43 files changed, 605 insertions(+), 569 deletions(-) create mode 100644 libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc create mode 100644 libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/parms.cc create mode 100644 libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/equal.cc create mode 100644 libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/inequal.cc create mode 100644 libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/serialize.cc create mode 100644 libstdc++-v3/testsuite/ext/random/triangular_distribution/requirements/explicit_instantiation/1.cc create mode 100644 libstdc++-v3/testsuite/ext/random/triangular_distribution/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc create mode 100644 libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/parms.cc create mode 100644 libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/equal.cc create mode 100644 libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/inequal.cc create mode 100644 libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/serialize.cc create mode 100644 libstdc++-v3/testsuite/ext/random/von_mises_distribution/requirements/explicit_instantiation/1.cc create mode 100644 libstdc++-v3/testsuite/ext/random/von_mises_distribution/requirements/typedefs.cc delete mode 100644 libstdc++-v3/testsuite/ext/triangular_distribution/cons/default.cc delete mode 100644 libstdc++-v3/testsuite/ext/triangular_distribution/cons/parms.cc delete mode 100644 libstdc++-v3/testsuite/ext/triangular_distribution/operators/equal.cc delete mode 100644 libstdc++-v3/testsuite/ext/triangular_distribution/operators/inequal.cc delete mode 100644 libstdc++-v3/testsuite/ext/triangular_distribution/operators/serialize.cc delete mode 100644 libstdc++-v3/testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc delete mode 100644 libstdc++-v3/testsuite/ext/triangular_distribution/requirements/typedefs.cc delete mode 100644 libstdc++-v3/testsuite/ext/von_mises_distribution/cons/default.cc delete mode 100644 libstdc++-v3/testsuite/ext/von_mises_distribution/cons/parms.cc delete mode 100644 libstdc++-v3/testsuite/ext/von_mises_distribution/operators/equal.cc delete mode 100644 libstdc++-v3/testsuite/ext/von_mises_distribution/operators/inequal.cc delete mode 100644 libstdc++-v3/testsuite/ext/von_mises_distribution/operators/serialize.cc delete mode 100644 libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc delete mode 100644 libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/typedefs.cc (limited to 'libstdc++-v3') diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 40d569e..174bfeb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,39 @@ +2013-08-07 Paolo Carlini + + PR libstdc++/58098 + * include/bits/random.h (cauchy_distribution<>::min, + extreme_value_distribution<>::min, normal_distribution<>::min, + student_t_distribution<>::min): Fix. + * include/ext/random (normal_mv_distribution<>::min): Likewise. + * testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc: + Adjust. + testsuite/26_numerics/random/cauchy_distribution/cons/default.cc: + Likewise. + * testsuite/26_numerics/random/extreme_value_distribution/cons/ + parms.cc: Likewise. + testsuite/26_numerics/random/extreme_value_distribution/cons/ + default.cc: Likewise. + * testsuite/26_numerics/random/normal_distribution/cons/parms.cc: + Likewise. + * testsuite/26_numerics/random/normal_distribution/cons/default.cc: + Likewise. + * testsuite/26_numerics/random/student_t_distribution/cons/parms.cc: + Likewise. + * testsuite/26_numerics/random/student_t_distribution/cons/default.cc: + Likewise. + * testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise. + * testsuite/ext/random/normal_mv_distribution/cons/default.cc: Likewise. + + * testsuite/26_numerics/random/exponential_distribution/cons/parms.cc: + Minor tweak. + * testsuite/26_numerics/random/exponential_distribution/cons/default.cc: + Likewise. + + * testsuite/ext/von_mises_distribution/*: Move to... + * testsuite/ext/random/von_mises_distribution/*: ... here. + * testsuite/ext/triangular_distribution/*: Move to... + * testsuite/ext/random/triangular_distribution/*: ... here. + 2013-08-06 Caroline Tice * fragment.am: Add XTEMPLATE_FLAGS. diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h index bf7f32f..dde2dd4 100644 --- a/libstdc++-v3/include/bits/random.h +++ b/libstdc++-v3/include/bits/random.h @@ -2178,7 +2178,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ result_type min() const - { return std::numeric_limits::min(); } + { return std::numeric_limits::lowest(); } /** * @brief Returns the least upper bound value of the distribution. @@ -3011,7 +3011,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ result_type min() const - { return std::numeric_limits::min(); } + { return std::numeric_limits::lowest(); } /** * @brief Returns the least upper bound value of the distribution. @@ -3428,7 +3428,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ result_type min() const - { return std::numeric_limits::min(); } + { return std::numeric_limits::lowest(); } /** * @brief Returns the least upper bound value of the distribution. @@ -5136,7 +5136,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ result_type min() const - { return std::numeric_limits::min(); } + { return std::numeric_limits::lowest(); } /** * @brief Returns the least upper bound value of the distribution. diff --git a/libstdc++-v3/include/ext/random b/libstdc++-v3/include/ext/random index 5f365e6..347ebed 100644 --- a/libstdc++-v3/include/ext/random +++ b/libstdc++-v3/include/ext/random @@ -791,7 +791,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION result_type min() const { result_type __res; - __res.fill(std::numeric_limits<_RealType>::min()); + __res.fill(std::numeric_limits<_RealType>::lowest()); return __res; } /** diff --git a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc index 37455ce..2a3465b 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc @@ -35,7 +35,7 @@ test01() VERIFY( u.a() == 0.0 ); VERIFY( u.b() == 1.0 ); typedef std::cauchy_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc index 2ac096b..67fb171 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc @@ -35,7 +35,7 @@ test01() VERIFY( u.a() == 5.0 ); VERIFY( u.b() == 2.0 ); typedef std::cauchy_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc index 486a1b2..f84b130 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc @@ -34,7 +34,7 @@ test01() std::exponential_distribution<> u; VERIFY( u.lambda() == 1.0 ); typedef std::exponential_distribution<>::result_type result_type; - VERIFY( u.min() == 0 ); + VERIFY( u.min() == 0.0 ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/parms.cc b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/parms.cc index d1fc4dc..ef2decf 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/parms.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/parms.cc @@ -34,7 +34,7 @@ test01() std::exponential_distribution<> u(0.5); VERIFY( u.lambda() == 0.5 ); typedef std::exponential_distribution<>::result_type result_type; - VERIFY( u.min() == 0 ); + VERIFY( u.min() == 0.0 ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc index a8845e4..c14c49c 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc @@ -35,7 +35,7 @@ test01() VERIFY( u.a() == 0.0 ); VERIFY( u.b() == 1.0 ); typedef std::extreme_value_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/parms.cc b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/parms.cc index daa20b5..786847f 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/parms.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/parms.cc @@ -35,7 +35,7 @@ test01() VERIFY( u.a() == 5.0 ); VERIFY( u.b() == 2.0 ); typedef std::extreme_value_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc index 2ffa330..8beb8bd 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc @@ -35,7 +35,7 @@ test01() VERIFY( u.mean() == 0.0 ); VERIFY( u.stddev() == 1.0 ); typedef std::normal_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/parms.cc b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/parms.cc index 0c2b799..ea87162 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/parms.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/parms.cc @@ -35,7 +35,7 @@ test01() VERIFY( u.mean() == 5.0 ); VERIFY( u.stddev() == 2.0 ); typedef std::normal_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc index 8318b37..0b5b8fa 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc @@ -34,7 +34,7 @@ test01() std::student_t_distribution<> u; VERIFY( u.n() == 1.0 ); typedef std::student_t_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/parms.cc b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/parms.cc index fb3dc05..1b99962 100644 --- a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/parms.cc +++ b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/parms.cc @@ -34,7 +34,7 @@ test01() std::student_t_distribution<> u(1.5); VERIFY( u.n() == 1.5 ); typedef std::student_t_distribution<>::result_type result_type; - VERIFY( u.min() == std::numeric_limits::min() ); + VERIFY( u.min() == std::numeric_limits::lowest() ); VERIFY( u.max() == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc index db3db48..80ad819 100644 --- a/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc +++ b/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc @@ -36,9 +36,9 @@ test01() VERIFY( u.varcov()[1] == 0.0 ); VERIFY( u.varcov()[2] == 1.0 ); typedef __gnu_cxx::normal_mv_distribution<2>::result_type result_type; - VERIFY( u.min()[0] == std::numeric_limits::min() ); + VERIFY( u.min()[0] == std::numeric_limits::lowest() ); VERIFY( u.max()[0] == std::numeric_limits::max() ); - VERIFY( u.min()[1] == std::numeric_limits::min() ); + VERIFY( u.min()[1] == std::numeric_limits::lowest() ); VERIFY( u.max()[1] == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/parms.cc b/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/parms.cc index b546d07..3c51e7d 100644 --- a/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/parms.cc +++ b/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/parms.cc @@ -36,9 +36,9 @@ test01() VERIFY( u.varcov()[1] == 0.0 ); VERIFY( u.varcov()[2] == 3.0 ); typedef __gnu_cxx::normal_mv_distribution<2>::result_type result_type; - VERIFY( u.min()[0] == std::numeric_limits::min() ); + VERIFY( u.min()[0] == std::numeric_limits::lowest() ); VERIFY( u.max()[0] == std::numeric_limits::max() ); - VERIFY( u.min()[1] == std::numeric_limits::min() ); + VERIFY( u.min()[1] == std::numeric_limits::lowest() ); VERIFY( u.max()[1] == std::numeric_limits::max() ); } diff --git a/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc new file mode 100644 index 0000000..63303f8 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc @@ -0,0 +1,44 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::triangular_distribution<> u; + VERIFY( u.a() == 0.0 ); + VERIFY( u.b() == 0.5 ); + VERIFY( u.c() == 1.0 ); + VERIFY( u.min() == 0.0 ); + VERIFY( u.max() == 1.0 ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/parms.cc b/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/parms.cc new file mode 100644 index 0000000..8380965 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/parms.cc @@ -0,0 +1,44 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::triangular_distribution<> u(1.5, 3.0, 3.5); + VERIFY( u.a() == 1.5 ); + VERIFY( u.b() == 3.0 ); + VERIFY( u.c() == 3.5 ); + VERIFY( u.min() == 1.5 ); + VERIFY( u.max() == 3.5 ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/equal.cc b/libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/equal.cc new file mode 100644 index 0000000..c38ea4c --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/equal.cc @@ -0,0 +1,42 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2010-03-16 Paolo Carlini +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::triangular_distribution u(1.5, 3.0, 4.0), v, w; + + VERIFY( v == w ); + VERIFY( !(u == v) ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/inequal.cc new file mode 100644 index 0000000..c4a014e --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/inequal.cc @@ -0,0 +1,42 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2010-03-16 Paolo Carlini +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::triangular_distribution u(1.5, 3.0, 5.0), v, w; + + VERIFY( u != v ); + VERIFY( !(v != w) ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/serialize.cc b/libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/serialize.cc new file mode 100644 index 0000000..7878376 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/triangular_distribution/operators/serialize.cc @@ -0,0 +1,44 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + std::stringstream str; + __gnu_cxx::triangular_distribution u(1.5, 3.0, 4.5), v; + std::minstd_rand0 rng; + + u(rng); // advance + str << u; + + str >> v; +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/triangular_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/ext/random/triangular_distribution/requirements/explicit_instantiation/1.cc new file mode 100644 index 0000000..189bdaf --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/triangular_distribution/requirements/explicit_instantiation/1.cc @@ -0,0 +1,26 @@ +// { dg-do compile } +// { dg-options "-std=c++11" } +// { dg-require-cstdint "" } +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include + +template class __gnu_cxx::triangular_distribution; +template class __gnu_cxx::triangular_distribution; +template class __gnu_cxx::triangular_distribution; diff --git a/libstdc++-v3/testsuite/ext/random/triangular_distribution/requirements/typedefs.cc b/libstdc++-v3/testsuite/ext/random/triangular_distribution/requirements/typedefs.cc new file mode 100644 index 0000000..835e8e7 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/triangular_distribution/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-do compile } +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include + +void +test01() +{ + typedef __gnu_cxx::triangular_distribution test_type; + + typedef test_type::result_type result_type; + typedef test_type::param_type param_type; +} diff --git a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc new file mode 100644 index 0000000..3183c85 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc @@ -0,0 +1,43 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::von_mises_distribution<> u; + VERIFY( u.mu() == 0.0 ); + VERIFY( u.kappa() == 1.0 ); + VERIFY( u.min() == -__gnu_cxx::__math_constants::__pi ); + VERIFY( u.max() == __gnu_cxx::__math_constants::__pi ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/parms.cc b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/parms.cc new file mode 100644 index 0000000..6c1f8f7 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/parms.cc @@ -0,0 +1,43 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::von_mises_distribution<> u(1.5, 3.0); + VERIFY( u.mu() == 1.5 ); + VERIFY( u.kappa() == 3.0 ); + VERIFY( u.min() == -__gnu_cxx::__math_constants::__pi ); + VERIFY( u.max() == __gnu_cxx::__math_constants::__pi ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/equal.cc b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/equal.cc new file mode 100644 index 0000000..569a9aa --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/equal.cc @@ -0,0 +1,42 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2010-03-16 Paolo Carlini +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::von_mises_distribution u(1.5, 3.0), v, w; + + VERIFY( v == w ); + VERIFY( !(u == v) ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/inequal.cc new file mode 100644 index 0000000..a4d2d8d --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/inequal.cc @@ -0,0 +1,42 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2010-03-16 Paolo Carlini +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + bool test __attribute__((unused)) = true; + + __gnu_cxx::von_mises_distribution u(1.5, 3.0), v, w; + + VERIFY( u != v ); + VERIFY( !(v != w) ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/serialize.cc b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/serialize.cc new file mode 100644 index 0000000..5437c13 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/operators/serialize.cc @@ -0,0 +1,44 @@ +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include +#include + +void +test01() +{ + std::stringstream str; + __gnu_cxx::von_mises_distribution u(1.5, 3.0), v; + std::minstd_rand0 rng; + + u(rng); // advance + str << u; + + str >> v; +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/requirements/explicit_instantiation/1.cc new file mode 100644 index 0000000..d93093f --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/requirements/explicit_instantiation/1.cc @@ -0,0 +1,26 @@ +// { dg-do compile } +// { dg-options "-std=c++11" } +// { dg-require-cstdint "" } +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include + +template class __gnu_cxx::von_mises_distribution; +template class __gnu_cxx::von_mises_distribution; +template class __gnu_cxx::von_mises_distribution; diff --git a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/requirements/typedefs.cc b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/requirements/typedefs.cc new file mode 100644 index 0000000..c8c34ab --- /dev/null +++ b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-do compile } +// { dg-options "-std=c++0x" } +// { dg-require-cstdint "" } +// +// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> +// 2013-03-02 Ulrich Drepper +// +// Copyright (C) 2013 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 3, 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 COPYING3. If not see +// . + +#include + +void +test01() +{ + typedef __gnu_cxx::von_mises_distribution test_type; + + typedef test_type::result_type result_type; + typedef test_type::param_type param_type; +} diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/cons/default.cc deleted file mode 100644 index 63303f8..0000000 --- a/libstdc++-v3/testsuite/ext/triangular_distribution/cons/default.cc +++ /dev/null @@ -1,44 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::triangular_distribution<> u; - VERIFY( u.a() == 0.0 ); - VERIFY( u.b() == 0.5 ); - VERIFY( u.c() == 1.0 ); - VERIFY( u.min() == 0.0 ); - VERIFY( u.max() == 1.0 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/cons/parms.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/cons/parms.cc deleted file mode 100644 index 8380965..0000000 --- a/libstdc++-v3/testsuite/ext/triangular_distribution/cons/parms.cc +++ /dev/null @@ -1,44 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::triangular_distribution<> u(1.5, 3.0, 3.5); - VERIFY( u.a() == 1.5 ); - VERIFY( u.b() == 3.0 ); - VERIFY( u.c() == 3.5 ); - VERIFY( u.min() == 1.5 ); - VERIFY( u.max() == 3.5 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/operators/equal.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/operators/equal.cc deleted file mode 100644 index c38ea4c..0000000 --- a/libstdc++-v3/testsuite/ext/triangular_distribution/operators/equal.cc +++ /dev/null @@ -1,42 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2010-03-16 Paolo Carlini -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::triangular_distribution u(1.5, 3.0, 4.0), v, w; - - VERIFY( v == w ); - VERIFY( !(u == v) ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/operators/inequal.cc deleted file mode 100644 index c4a014e..0000000 --- a/libstdc++-v3/testsuite/ext/triangular_distribution/operators/inequal.cc +++ /dev/null @@ -1,42 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2010-03-16 Paolo Carlini -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::triangular_distribution u(1.5, 3.0, 5.0), v, w; - - VERIFY( u != v ); - VERIFY( !(v != w) ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/operators/serialize.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/operators/serialize.cc deleted file mode 100644 index 7878376..0000000 --- a/libstdc++-v3/testsuite/ext/triangular_distribution/operators/serialize.cc +++ /dev/null @@ -1,44 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - std::stringstream str; - __gnu_cxx::triangular_distribution u(1.5, 3.0, 4.5), v; - std::minstd_rand0 rng; - - u(rng); // advance - str << u; - - str >> v; -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc deleted file mode 100644 index 189bdaf..0000000 --- a/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/explicit_instantiation/1.cc +++ /dev/null @@ -1,26 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=c++11" } -// { dg-require-cstdint "" } -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include - -template class __gnu_cxx::triangular_distribution; -template class __gnu_cxx::triangular_distribution; -template class __gnu_cxx::triangular_distribution; diff --git a/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/typedefs.cc b/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/typedefs.cc deleted file mode 100644 index 835e8e7..0000000 --- a/libstdc++-v3/testsuite/ext/triangular_distribution/requirements/typedefs.cc +++ /dev/null @@ -1,34 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include - -void -test01() -{ - typedef __gnu_cxx::triangular_distribution test_type; - - typedef test_type::result_type result_type; - typedef test_type::param_type param_type; -} diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/default.cc deleted file mode 100644 index 3183c85..0000000 --- a/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/default.cc +++ /dev/null @@ -1,43 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::von_mises_distribution<> u; - VERIFY( u.mu() == 0.0 ); - VERIFY( u.kappa() == 1.0 ); - VERIFY( u.min() == -__gnu_cxx::__math_constants::__pi ); - VERIFY( u.max() == __gnu_cxx::__math_constants::__pi ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/parms.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/parms.cc deleted file mode 100644 index 6c1f8f7..0000000 --- a/libstdc++-v3/testsuite/ext/von_mises_distribution/cons/parms.cc +++ /dev/null @@ -1,43 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::von_mises_distribution<> u(1.5, 3.0); - VERIFY( u.mu() == 1.5 ); - VERIFY( u.kappa() == 3.0 ); - VERIFY( u.min() == -__gnu_cxx::__math_constants::__pi ); - VERIFY( u.max() == __gnu_cxx::__math_constants::__pi ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/equal.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/equal.cc deleted file mode 100644 index 569a9aa..0000000 --- a/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/equal.cc +++ /dev/null @@ -1,42 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2010-03-16 Paolo Carlini -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::von_mises_distribution u(1.5, 3.0), v, w; - - VERIFY( v == w ); - VERIFY( !(u == v) ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/inequal.cc deleted file mode 100644 index a4d2d8d..0000000 --- a/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/inequal.cc +++ /dev/null @@ -1,42 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2010-03-16 Paolo Carlini -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::von_mises_distribution u(1.5, 3.0), v, w; - - VERIFY( u != v ); - VERIFY( !(v != w) ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/serialize.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/serialize.cc deleted file mode 100644 index 5437c13..0000000 --- a/libstdc++-v3/testsuite/ext/von_mises_distribution/operators/serialize.cc +++ /dev/null @@ -1,44 +0,0 @@ -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2009-08-14 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include -#include - -void -test01() -{ - std::stringstream str; - __gnu_cxx::von_mises_distribution u(1.5, 3.0), v; - std::minstd_rand0 rng; - - u(rng); // advance - str << u; - - str >> v; -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc deleted file mode 100644 index d93093f..0000000 --- a/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/explicit_instantiation/1.cc +++ /dev/null @@ -1,26 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=c++11" } -// { dg-require-cstdint "" } -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include - -template class __gnu_cxx::von_mises_distribution; -template class __gnu_cxx::von_mises_distribution; -template class __gnu_cxx::von_mises_distribution; diff --git a/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/typedefs.cc b/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/typedefs.cc deleted file mode 100644 index c8c34ab..0000000 --- a/libstdc++-v3/testsuite/ext/von_mises_distribution/requirements/typedefs.cc +++ /dev/null @@ -1,34 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=c++0x" } -// { dg-require-cstdint "" } -// -// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net> -// 2013-03-02 Ulrich Drepper -// -// Copyright (C) 2013 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 3, 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 COPYING3. If not see -// . - -#include - -void -test01() -{ - typedef __gnu_cxx::von_mises_distribution test_type; - - typedef test_type::result_type result_type; - typedef test_type::param_type param_type; -} -- cgit v1.1