]> git.proxmox.com Git - ceph.git/blame - ceph/src/Beast/test/websocket/mask.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / Beast / test / websocket / mask.cpp
CommitLineData
7c673cae
FG
1//
2// Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3//
4// Distributed under the Boost Software License, Version 1.0. (See accompanying
5// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6//
7
8// Test that header file is self-contained.
9#include <beast/websocket/detail/mask.hpp>
10
11#include <beast/unit_test/suite.hpp>
12
13namespace beast {
14namespace websocket {
15namespace detail {
16
17class mask_test : public beast::unit_test::suite
18{
19public:
20 struct test_generator
21 {
22 using result_type = std::uint32_t;
23
24 result_type n = 0;
25
26 void
27 seed(std::seed_seq const&)
28 {
29 }
30
31 void
32 seed(result_type const&)
33 {
34 }
35
36 std::uint32_t
37 operator()()
38 {
39 return n++;
40 }
41 };
42
43 void run() override
44 {
45 maskgen_t<test_generator> mg;
46 BEAST_EXPECT(mg() != 0);
47 }
48};
49
50BEAST_DEFINE_TESTSUITE(mask,websocket,beast);
51
52} // detail
53} // websocket
54} // beast
55