2
0
mirror of https://github.com/boostorg/url.git synced 2026-02-14 13:12:15 +00:00

refactor to const_string

close #110
This commit is contained in:
alandefreitas
2022-01-10 19:07:39 -03:00
committed by Vinnie Falco
parent 8fcda0c2a8
commit 1093ca5fd3
32 changed files with 318 additions and 246 deletions

View File

@@ -0,0 +1,42 @@
//
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.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/const_string.hpp>
#include "test_suite.hpp"
namespace boost {
namespace urls {
#ifdef BOOST_URL_HAS_STRING_VIEW
BOOST_STATIC_ASSERT(is_stringlike<
std::string_view>::value);
#endif
class string_test
{
public:
void
run()
{
const_string sv("hello");
auto sv2 = sv;
BOOST_TEST(sv2 == sv);
sv = {};
BOOST_TEST(sv2 != sv);
}
};
TEST_SUITE(
string_test,
"boost.url.string");
} // urls
} // boost