-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
// { dg-require-cstdint "" }
//
-// Copyright (C) 2011 Free Software Foundation, Inc.
+// Copyright (C) 2011-2024 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
#include <functional>
#include <testsuite_random.h>
+// { dg-additional-options "-DSIMULATOR_TEST" { target simulator } }
+
+#ifdef SIMULATOR_TEST
+# define ARGS 100, 1000
+#else
+# define ARGS
+#endif
+
void test01()
{
using namespace __gnu_test;
std::bernoulli_distribution bd1(0.25);
auto bbd1 = std::bind(bd1, eng);
- testDiscreteDist(bbd1, [](int n) { return bernoulli_pdf(n, 0.25); } );
+ testDiscreteDist<ARGS>(bbd1, [](int n) { return bernoulli_pdf(n, 0.25); } );
std::bernoulli_distribution bd2(0.5);
auto bbd2 = std::bind(bd2, eng);
- testDiscreteDist(bbd2, [](int n) { return bernoulli_pdf(n, 0.5); } );
+ testDiscreteDist<ARGS>(bbd2, [](int n) { return bernoulli_pdf(n, 0.5); } );
std::bernoulli_distribution bd3(0.75);
auto bbd3 = std::bind(bd3, eng);
- testDiscreteDist(bbd3, [](int n) { return bernoulli_pdf(n, 0.75); } );
+ testDiscreteDist<ARGS>(bbd3, [](int n) { return bernoulli_pdf(n, 0.75); } );
}
int main()