Files
beast/test/websocket/mask.cpp
T

51 lines
949 B
C++
Raw Normal View History

2016-05-06 21:51:43 -04:00
//
// Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// 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)
//
2016-05-15 16:22:25 -04:00
// Test that header file is self-contained.
2016-05-06 21:51:43 -04:00
#include <beast/websocket/detail/mask.hpp>
2016-05-15 16:22:25 -04:00
2016-05-06 21:51:43 -04:00
#include <beast/unit_test/suite.hpp>
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&)
{
}
std::uint32_t
operator()()
{
return n++;
}
};
void run() override
{
maskgen_t<test_generator> mg;
2016-08-03 15:34:23 -04:00
BEAST_EXPECT(mg() != 0);
2016-05-06 21:51:43 -04:00
}
};
BEAST_DEFINE_TESTSUITE(mask,websocket,beast);
} // detail
} // websocket
} // beast