1 | //===----------------------------------------------------------------------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // <random> |
10 | |
11 | // class bernoulli_distribution |
12 | |
13 | // bernoulli_distribution& operator=(const bernoulli_distribution&); |
14 | |
15 | #include <random> |
16 | #include <cassert> |
17 | |
18 | #include "test_macros.h" |
19 | |
20 | void |
21 | test1() |
22 | { |
23 | typedef std::bernoulli_distribution D; |
24 | D d1(0.75); |
25 | D d2; |
26 | assert(d1 != d2); |
27 | d2 = d1; |
28 | assert(d1 == d2); |
29 | } |
30 | |
31 | int main(int, char**) |
32 | { |
33 | test1(); |
34 | |
35 | return 0; |
36 | } |
37 | |