]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/parms.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / ext / random / nakagami_distribution / cons / parms.cc
index 95c5b12a2b32aadbbbbbbe399421681099dbbae0..1526638a68c6f50035a740b3d577270ddb9a2fdc 100644 (file)
@@ -1,9 +1,9 @@
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 //
 // 2012-09-18  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// Copyright (C) 2012-2014 Free Software Foundation, Inc.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,8 +29,6 @@
 void
 test01()
 {
-  bool test __attribute__((unused)) = true;
-
   __gnu_cxx::nakagami_distribution<> u(1.5, 3.0);
   VERIFY( u.mu() == 1.5 );
   VERIFY( u.omega() == 3.0 );
@@ -39,9 +37,20 @@ test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int
-main()
+void
+test02()
+{
+  using param_type = __gnu_cxx::nakagami_distribution<>::param_type;
+  const param_type p(1.5, 3.0);
+  __gnu_cxx::nakagami_distribution<> u(p);
+  VERIFY( u.param() == p );
+  VERIFY( u.param() != param_type{} );
+  typedef __gnu_cxx::nakagami_distribution<>::result_type result_type;
+  VERIFY( u.max() == std::numeric_limits<result_type>::max() );
+}
+
+int main()
 {
   test01();
-  return 0;
+  test02();
 }