Files
boost_beast/test/beast/websocket/mask.cpp
T

59 lines
1.1 KiB
C++
Raw Normal View History

2016-05-06 21:51:43 -04:00
//
2017-07-24 09:42:36 -07:00
// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
2016-05-06 21:51:43 -04:00
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
2017-07-20 13:40:34 -07:00
// Official repository: https://github.com/boostorg/beast
//
2016-05-06 21:51:43 -04:00
2016-05-15 16:22:25 -04:00
// Test that header file is self-contained.
2017-07-20 13:40:34 -07:00
#include <boost/beast/websocket/detail/mask.hpp>
2016-05-15 16:22:25 -04:00
2017-07-20 13:40:34 -07:00
#include <boost/beast/unit_test/suite.hpp>
2016-05-06 21:51:43 -04:00
2017-07-20 13:40:34 -07:00
namespace boost {
2016-05-06 21:51:43 -04:00
namespace beast {
namespace websocket {
namespace detail {
class mask_test : public beast::unit_test::suite
{
public:
struct test_generator
{
using result_type = std::uint32_t;
result_type n = 0;
void
seed(std::seed_seq const&)
{
}
2016-10-24 18:41:25 -04:00
void
seed(result_type const&)
{
}
2016-05-06 21:51:43 -04:00
std::uint32_t
operator()()
{
return n++;
}
};
void run() override
{
maskgen_t<test_generator> mg;
2017-07-25 12:35:54 -07:00
BEAST_EXPECT(mg() != 0);
2016-05-06 21:51:43 -04:00
}
};
2017-08-01 17:01:57 -07:00
BEAST_DEFINE_TESTSUITE(beast,websocket,mask);
2016-05-06 21:51:43 -04:00
} // detail
} // websocket
} // beast
2017-07-20 13:40:34 -07:00
} // boost