2
0
mirror of https://github.com/boostorg/url.git synced 2026-02-01 09:02:11 +00:00
Files
url/test/rfc/query_bnf.cpp
2021-09-05 16:18:04 -07:00

51 lines
949 B
C++

//
// Copyright (c) 2016-2019 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)
//
// Official repository: https://github.com/CPPAlliance/url
//
// Test that header file is self-contained.
#include <boost/url/rfc/query_bnf.hpp>
#include "test_suite.hpp"
#include "test_bnf.hpp"
#include <iostream>
namespace boost {
namespace urls {
namespace rfc {
class query_bnf_test
{
public:
void
run()
{
using T = test_ref<
query_bnf,
bnf::range<query_param>>;
bad <T>("%");
good<T>("");
good<T>("x");
good<T>("x=");
good<T>("x=y");
good<T>("x=y&");
good<T>("x=y&a");
good<T>("x=y&a=b&");
}
};
TEST_SUITE(
query_bnf_test,
"boost.url.query_bnf");
} // rfc
} // urls
} // boost