1 //===----------------------------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // <random>
11
12 // template<class Engine, size_t k>
13 // class shuffle_order_engine
14
15 // template <class charT, class traits,
16 // class Engine, size_t k>
17 // basic_ostream<charT, traits>&
18 // operator<<(basic_ostream<charT, traits>& os,
19 // const shuffle_order_engine<Engine, k>& x);
20 //
21 // template <class charT, class traits,
22 // class Engine, size_t k>
23 // basic_istream<charT, traits>&
24 // operator>>(basic_istream<charT, traits>& is,
25 // shuffle_order_engine<Engine, k>& x);
26
27 #include <random>
28 #include <sstream>
29 #include <cassert>
30
31 void
test1()32 test1()
33 {
34 typedef std::knuth_b E;
35 E e1;
36 e1.discard(100);
37 std::ostringstream os;
38 os << e1;
39 std::istringstream is(os.str());
40 E e2;
41 is >> e2;
42 assert(e1 == e2);
43 }
44
main()45 int main()
46 {
47 test1();
48 }
49