forked from boostorg/beast
Boost prep
This commit is contained in:
@@ -4,12 +4,15 @@
|
||||
// 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)
|
||||
//
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/websocket/rfc6455.hpp>
|
||||
#include <boost/beast/websocket/rfc6455.hpp>
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/beast/unit_test/suite.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace beast {
|
||||
namespace websocket {
|
||||
|
||||
@@ -22,18 +25,18 @@ public:
|
||||
{
|
||||
http::header<true> req;
|
||||
req.version = 10;
|
||||
BEAST_EXPECT(! is_upgrade(req));
|
||||
BOOST_BEAST_EXPECT(! is_upgrade(req));
|
||||
req.version = 11;
|
||||
req.method(http::verb::post);
|
||||
req.target("/");
|
||||
BEAST_EXPECT(! is_upgrade(req));
|
||||
BOOST_BEAST_EXPECT(! is_upgrade(req));
|
||||
req.method(http::verb::get);
|
||||
req.insert("Connection", "upgrade");
|
||||
BEAST_EXPECT(! is_upgrade(req));
|
||||
BOOST_BEAST_EXPECT(! is_upgrade(req));
|
||||
req.insert("Upgrade", "websocket");
|
||||
BEAST_EXPECT(! is_upgrade(req));
|
||||
BOOST_BEAST_EXPECT(! is_upgrade(req));
|
||||
req.insert("Sec-WebSocket-Version", "13");
|
||||
BEAST_EXPECT(is_upgrade(req));
|
||||
BOOST_BEAST_EXPECT(is_upgrade(req));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -43,7 +46,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(rfc6455,websocket,beast);
|
||||
BOOST_BEAST_DEFINE_TESTSUITE(rfc6455,websocket,beast);
|
||||
|
||||
} // websocket
|
||||
} // beast
|
||||
} // boost
|
||||
|
||||
Reference in New Issue
Block a user