mirror of
https://github.com/boostorg/static_string.git
synced 2025-06-25 11:51:34 +02:00
Compare commits
8 Commits
boost-1.74
...
remove-tra
Author | SHA1 | Date | |
---|---|---|---|
c5df271a1a | |||
6978da552e | |||
e6895ea26b | |||
d157311620 | |||
3a1efd2078 | |||
59c4c556bb | |||
c59150c042 | |||
d524755ec0 |
16
.travis.yml
16
.travis.yml
@ -99,8 +99,8 @@ anchors:
|
||||
"libc6-dbg",
|
||||
"libc++-dev",
|
||||
"libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-8",
|
||||
"ubuntu-toolchain-r-test" ] } }
|
||||
|
||||
"ubuntu-toolchain-r-test" ] } }
|
||||
|
||||
gcc-48: &gcc-48 { apt: { packages: [ "g++-4.8" ] } }
|
||||
gcc-49: &gcc-49 { apt: { packages: [ "g++-4.9" ], sources: [ "ubuntu-toolchain-r-test" ] } }
|
||||
gcc-5: &gcc-5 { apt: { packages: [ "g++-5" ] } }
|
||||
@ -190,7 +190,7 @@ jobs:
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=14,17" ], addons: *clang-6 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-7", "B2_CXXSTD=17" ], addons: *clang-7 }
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-8", "B2_CXXSTD=17" ], addons: *clang-8 }
|
||||
|
||||
|
||||
- os: "linux"
|
||||
env: ["B2_TOOLSET=clang-9", "B2_CXXSTD=11,14,17"]
|
||||
addons:
|
||||
@ -203,8 +203,8 @@ jobs:
|
||||
- clang-9
|
||||
- libc6-dbg
|
||||
- libc++-dev
|
||||
- libstdc++-8-dev
|
||||
|
||||
- libstdc++-8-dev
|
||||
|
||||
# libc++
|
||||
- { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=11,14",
|
||||
"B2_CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 }
|
||||
@ -246,7 +246,7 @@ jobs:
|
||||
script:
|
||||
- cd $BOOST_ROOT/libs/$SELF
|
||||
- ci/travis/coverity.sh
|
||||
|
||||
|
||||
# Standalone tests for StaticString
|
||||
- { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=gcc-7", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *gcc-7 }
|
||||
- { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=gcc-8", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *gcc-8 }
|
||||
@ -267,9 +267,9 @@ jobs:
|
||||
- libc6-dbg
|
||||
- libc++-dev
|
||||
- libstdc++-8-dev
|
||||
|
||||
|
||||
- { os: "osx" , env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ] }
|
||||
|
||||
|
||||
notifications:
|
||||
email:
|
||||
false
|
||||
|
@ -1,3 +1,30 @@
|
||||
# Generated by `boostdep --cmake static_string`
|
||||
# Copyright 2020 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
project(boost_static_string VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
|
||||
add_library(boost_static_string INTERFACE)
|
||||
add_library(Boost::static_string ALIAS boost_static_string)
|
||||
|
||||
target_include_directories(boost_static_string INTERFACE include)
|
||||
|
||||
target_link_libraries(boost_static_string
|
||||
INTERFACE
|
||||
Boost::assert
|
||||
Boost::container_hash
|
||||
Boost::static_assert
|
||||
Boost::throw_exception
|
||||
Boost::utility
|
||||
)
|
||||
|
||||
else()
|
||||
|
||||
#
|
||||
# Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
|
||||
#
|
||||
@ -7,12 +34,6 @@
|
||||
# Official repository: https://github.com/boostorg/static_string
|
||||
#
|
||||
|
||||
cmake_minimum_required (VERSION 3.5.1)
|
||||
|
||||
if (POLICY CMP0074)
|
||||
cmake_policy (SET CMP0074 NEW)
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
function (DoGroupSources curdir rootdir folder)
|
||||
@ -40,8 +61,6 @@ endfunction()
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
project (StaticString VERSION 1)
|
||||
|
||||
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
if (MSVC)
|
||||
@ -150,3 +169,5 @@ file (GLOB_RECURSE PROJECT_FILES
|
||||
)
|
||||
|
||||
add_subdirectory (test)
|
||||
|
||||
endif()
|
||||
|
31
doc/Jamfile
31
doc/Jamfile
@ -101,26 +101,13 @@ make common.xsl : $(docca)/include/docca/common.xsl
|
||||
make stage1.xsl : $(docca)/include/docca/stage1.xsl : @copy_script ;
|
||||
make base-stage1.xsl : $(docca)/include/docca/base-stage1.xsl : @copy_script ;
|
||||
make stage2.xsl : $(docca)/include/docca/stage2.xsl : @copy_script ;
|
||||
make base-stage2.xsl : $(docca)/include/docca/base-stage2.xsl : @copy_script ;
|
||||
make assemble-quickbook.xsl : $(docca)/include/docca/assemble-quickbook.xsl : @copy_script ;
|
||||
make emphasized-types.xsl : $(docca)/include/docca/emphasized-types.xsl : @copy_script ;
|
||||
make base-config.xsl : $(docca)/include/docca/base-config.xsl : @copy_script ;
|
||||
|
||||
make config.xsl
|
||||
:
|
||||
$(docca)/include/docca/config.xsl
|
||||
xsl/config.xsl
|
||||
xsl/class_detail.xsl
|
||||
xsl/includes.xsl
|
||||
:
|
||||
@make_config
|
||||
;
|
||||
|
||||
actions make_config
|
||||
{
|
||||
cp $(2[1]) $(1)
|
||||
sed -i -e "/<!-- CONFIG_TEMPLATE -->/{r $(2[2])" -e "d}" $(1)
|
||||
sed -i -e "/<!-- CLASS_DETAIL_TEMPLATE -->/{r $(2[3])" -e "d}" $(1)
|
||||
sed -i -e "/<!-- INCLUDES_TEMPLATE -->/{r $(2[4])" -e "d}" $(1)
|
||||
}
|
||||
# Copy the project-specific config XSLT
|
||||
make custom-overrides.xsl : xsl/custom-overrides.xsl : @copy_script ;
|
||||
|
||||
# Make a copy of the given file.
|
||||
#
|
||||
@ -145,7 +132,8 @@ make xml-pages.xml
|
||||
|
||||
# Make bjam aware of additional dependencies
|
||||
base-extract-xml-pages.xsl
|
||||
config.xsl
|
||||
base-config.xsl
|
||||
custom-overrides.xsl
|
||||
common.xsl
|
||||
:
|
||||
saxonhe.saxonhe
|
||||
@ -176,7 +164,8 @@ make stage1/results
|
||||
# additional dependencies
|
||||
xml-pages.xml
|
||||
base-stage1.xsl
|
||||
config.xsl
|
||||
base-config.xsl
|
||||
custom-overrides.xsl
|
||||
common.xsl
|
||||
:
|
||||
saxonhe.saxonhe_dir
|
||||
@ -189,6 +178,10 @@ make stage2/results
|
||||
|
||||
# additional dependencies
|
||||
emphasized-types.xsl
|
||||
base-stage2.xsl
|
||||
base-config.xsl
|
||||
custom-overrides.xsl
|
||||
common.xsl
|
||||
:
|
||||
saxonhe.saxonhe_dir
|
||||
;
|
||||
|
@ -32,6 +32,7 @@
|
||||
[template include_file[path][^<'''<ulink url="../../../../'''[path]'''">'''[path]'''</ulink>'''>]]
|
||||
|
||||
[def __InputIterator__ [@https://en.cppreference.com/w/cpp/named_req/InputIterator ['InputIterator]]]
|
||||
[def __UnaryPredicate__ [@https://en.cppreference.com/w/cpp/named_req/Predicate ['Predicate]]]
|
||||
|
||||
[/-----------------------------------------------------------------------------]
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
<!-- CLASS_DETAIL_TEMPLATE BEGIN -->
|
||||
<xsl:when test="$normal-tparam = 'InputIterator'"><xsl:text>__InputIterator__</xsl:text></xsl:when>
|
||||
<!-- CLASS_DETAIL_TEMPLATE END -->
|
@ -1,6 +0,0 @@
|
||||
<!-- Variables (Edit for your project) -->
|
||||
<xsl:variable name="doc-ref" select="'static_string.ref'"/>
|
||||
<xsl:variable name="doc-ns" select="'boost::static_strings'"/>
|
||||
<xsl:variable name="debug" select="0"/>
|
||||
<xsl:variable name="private" select="0"/>
|
||||
<!-- End Variables -->
|
11
doc/xsl/custom-overrides.xsl
Normal file
11
doc/xsl/custom-overrides.xsl
Normal file
@ -0,0 +1,11 @@
|
||||
<xsl:stylesheet version="3.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
exclude-result-prefixes="xs"
|
||||
expand-text="yes">
|
||||
|
||||
<xsl:variable name="doc-ref" select="'static_string.ref'"/>
|
||||
<xsl:variable name="doc-ns" select="'boost::static_strings'"/>
|
||||
<xsl:variable name="include-private-members" select="false()"/>
|
||||
|
||||
</xsl:stylesheet>
|
@ -1,5 +0,0 @@
|
||||
<!-- INCLUDES_TEMPLATE BEGIN -->
|
||||
<xsl:text>Defined in header [include_file </xsl:text>
|
||||
<xsl:value-of select="substring-after($file,'include/')"/>
|
||||
<xsl:text>]

</xsl:text>
|
||||
<!-- INCLUDES_TEMPLATE END -->
|
@ -1,7 +0,0 @@
|
||||
<!-- INCLUDES_FOOT_TEMPLATE BEGIN -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($file, 'supercalifragilisticexpialidocious')">
|
||||
<xsl:text>

Easter Egg
</xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<!-- INCLUDES_FOOT_TEMPLATE END -->
|
@ -20,7 +20,7 @@
|
||||
#endif
|
||||
|
||||
// Include <version> if we can
|
||||
#ifdef __has_include
|
||||
#ifdef __has_include
|
||||
#if __has_include(<version>)
|
||||
#include <version>
|
||||
#endif
|
||||
@ -45,7 +45,7 @@
|
||||
#define BOOST_STATIC_STRING_CHECK_FOR_ATTR(x) __has_cpp_attribute(x)
|
||||
#elif defined(__has_attribute)
|
||||
#define BOOST_STATIC_STRING_CHECK_FOR_ATTR(x) __has_attribute(x)
|
||||
#else
|
||||
#else
|
||||
#define BOOST_STATIC_STRING_CHECK_FOR_ATTR(x) 0
|
||||
#endif
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,8 @@
|
||||
"String"
|
||||
],
|
||||
"maintainers": [
|
||||
"Krystian Stasiowski <sdkrystian@gmail.com>"
|
||||
]
|
||||
"Krystian Stasiowski <sdkrystian@gmail.com>",
|
||||
"Vinnie Falco <vinnie.falco@gmail.com>"
|
||||
],
|
||||
"cxxstd": "11"
|
||||
}
|
||||
|
@ -41,14 +41,14 @@ struct cxper_char_traits
|
||||
*(dest++) = *(src++);
|
||||
return temp;
|
||||
}
|
||||
static constexpr char_type* copy(char_type* dest, const char_type* src, std::size_t n)
|
||||
{
|
||||
static constexpr char_type* copy(char_type* dest, const char_type* src, std::size_t n)
|
||||
{
|
||||
const auto temp = dest;
|
||||
while (n--)
|
||||
*(dest++) = *(src++);
|
||||
return temp;
|
||||
}
|
||||
static constexpr char_type* assign(char_type* dest, std::size_t n, char_type ch)
|
||||
static constexpr char_type* assign(char_type* dest, std::size_t n, char_type ch)
|
||||
{
|
||||
const auto temp = dest;
|
||||
while (n--)
|
||||
@ -62,8 +62,8 @@ using cxper_char_traits = std::char_traits<char>;
|
||||
using cstatic_string = basic_static_string<50, char, cxper_char_traits>;
|
||||
|
||||
inline
|
||||
constexpr
|
||||
bool
|
||||
constexpr
|
||||
bool
|
||||
testConstantEvaluation()
|
||||
{
|
||||
#ifdef BOOST_STATIC_STRING_CPP20
|
||||
@ -421,7 +421,7 @@ testConstantEvaluation()
|
||||
// ends_with
|
||||
a.ends_with('a');
|
||||
a.ends_with("a");
|
||||
|
||||
|
||||
return true;
|
||||
#elif defined(BOOST_STATIC_STRING_CPP14)
|
||||
// c++14 constexpr tests
|
||||
@ -521,17 +521,17 @@ testConstantEvaluation()
|
||||
a.compare("a");
|
||||
a.compare(0, 1, "a");
|
||||
a.compare(0, 1, "a", 1);
|
||||
|
||||
|
||||
// substr
|
||||
// in gcc 5, a constexpr non-static member function returning the class
|
||||
// is a member of causes an ICE
|
||||
#ifndef BOOST_STATIC_STRING_GCC5_BAD_CONSTEXPR
|
||||
a.substr(0, 1);
|
||||
#endif
|
||||
|
||||
|
||||
// subview
|
||||
a.subview(0);
|
||||
|
||||
|
||||
// copy
|
||||
char k[20]{};
|
||||
a.copy(k, 1, 0);
|
||||
@ -596,9 +596,9 @@ testConstantEvaluation()
|
||||
return true;
|
||||
#elif defined(BOOST_STATIC_STRING_CPP11)
|
||||
// c++11 constexpr tests
|
||||
return (cstatic_string().size() +
|
||||
cstatic_string().length() +
|
||||
cstatic_string().max_size() +
|
||||
return (cstatic_string().size() +
|
||||
cstatic_string().length() +
|
||||
cstatic_string().max_size() +
|
||||
cstatic_string().capacity()) != 0 &&
|
||||
cstatic_string().empty();
|
||||
#endif
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <cstdlib>
|
||||
#include <cwchar>
|
||||
#include <cctype>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@ -23,7 +24,7 @@ namespace boost {
|
||||
namespace static_strings {
|
||||
|
||||
template class basic_static_string<420, char>;
|
||||
|
||||
|
||||
using string_view = basic_string_view<char, std::char_traits<char>>;
|
||||
|
||||
template <class S>
|
||||
@ -109,7 +110,7 @@ testA(S s, const typename S::value_type* str, typename S::size_type n, S expecte
|
||||
return s.append(str, n) == expected;
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
sign(int x)
|
||||
{
|
||||
if (x == 0)
|
||||
@ -215,7 +216,7 @@ testR(S s, typename S::size_type pos, typename S::size_type n1, const typename S
|
||||
// this is a precondition violation for the const_iterator overload
|
||||
return s.replace(pos, n1, str, n2) == expected;
|
||||
else
|
||||
return s.replace(pos, n1, str, n2) == expected &&
|
||||
return s.replace(pos, n1, str, n2) == expected &&
|
||||
s0.replace(s0.begin() + pos, s0.begin() + pos + n1, str, str + n2) == expected;
|
||||
}
|
||||
else
|
||||
@ -398,7 +399,7 @@ testAssignment()
|
||||
BOOST_TEST(static_string<3>{}.assign("abc", 3) == "abc");
|
||||
BOOST_TEST(static_string<3>{"*"}.assign("abc", 3) == "abc");
|
||||
BOOST_TEST_THROWS(static_string<1>{}.assign("abc", 3), std::length_error);
|
||||
|
||||
|
||||
// assign(CharT const* s)
|
||||
BOOST_TEST(static_string<3>{}.assign("abc") == "abc");
|
||||
BOOST_TEST(static_string<3>{"*"}.assign("abc") == "abc");
|
||||
@ -412,7 +413,7 @@ testAssignment()
|
||||
BOOST_TEST(static_string<4>{"*"}.assign(cs.begin(), cs.end()) == "abcd");
|
||||
BOOST_TEST_THROWS(static_string<2>{"*"}.assign(cs.begin(), cs.end()), std::length_error);
|
||||
}
|
||||
|
||||
|
||||
// assign(std::initializer_list<CharT> ilist)
|
||||
BOOST_TEST(static_string<3>{}.assign({'a', 'b', 'c'}) == "abc");
|
||||
BOOST_TEST(static_string<3>{"*"}.assign({'a', 'b', 'c'}) == "abc");
|
||||
@ -450,7 +451,7 @@ testAssignment()
|
||||
BOOST_TEST_THROWS(static_string<2>{"**"}.assign(T{}, 6, 3), std::out_of_range);
|
||||
BOOST_TEST_THROWS(static_string<2>{"**"}.assign(T{}, 1, 3), std::length_error);
|
||||
}
|
||||
|
||||
|
||||
//---
|
||||
|
||||
{
|
||||
@ -471,7 +472,7 @@ testAssignment()
|
||||
s3 = s1,
|
||||
std::length_error);
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
static_string<3> s1;
|
||||
s1 = "123";
|
||||
@ -685,7 +686,7 @@ testElements()
|
||||
BOOST_TEST(static_string<3>{"abc"}.at(2) == 'c');
|
||||
BOOST_TEST_THROWS(static_string<3>{""}.at(0), std::out_of_range);
|
||||
BOOST_TEST_THROWS(static_string<3>{"abc"}.at(4), std::out_of_range);
|
||||
|
||||
|
||||
// at(size_type pos) const
|
||||
BOOST_TEST(cfs3{"abc"}.at(0) == 'a');
|
||||
BOOST_TEST(cfs3{"abc"}.at(2) == 'c');
|
||||
@ -716,7 +717,7 @@ testElements()
|
||||
BOOST_TEST(static_string<3>{"a"}.back() == 'a');
|
||||
BOOST_TEST(static_string<3>{"abc"}.back() == 'c');
|
||||
|
||||
// back() const
|
||||
// back() const
|
||||
BOOST_TEST(cfs3{"a"}.back() == 'a');
|
||||
BOOST_TEST(cfs3{"abc"}.back() == 'c');
|
||||
|
||||
@ -923,7 +924,7 @@ testInsert()
|
||||
BOOST_TEST(static_string<4>{"ad"}.insert(1, "bcd", 2) == "abcd");
|
||||
BOOST_TEST_THROWS(static_string<4>{"abc"}.insert(4, "*"), std::out_of_range);
|
||||
BOOST_TEST_THROWS(static_string<3>{"abc"}.insert(1, "*"), std::length_error);
|
||||
|
||||
|
||||
// insert(size_type index, string_view_type sv)
|
||||
BOOST_TEST(static_string<3>{"ac"}.insert(1, sv{"b"}) == "abc");
|
||||
BOOST_TEST_THROWS(static_string<4>{"abc"}.insert(4, sv{"*"}), std::out_of_range);
|
||||
@ -1638,7 +1639,7 @@ testInsert()
|
||||
BOOST_TEST(testI(S("abcdefghijklmnopqrst"), 21, "12345678901234567890", 20, S("can't happen")));
|
||||
}
|
||||
|
||||
// done
|
||||
// done
|
||||
static
|
||||
void
|
||||
testErase()
|
||||
@ -1848,6 +1849,51 @@ testErase()
|
||||
BOOST_TEST(testE(S("abcdefghijklmnopqrst"), 21, 0, S("can't happen")));
|
||||
}
|
||||
|
||||
// done
|
||||
static
|
||||
void
|
||||
testEraseIf()
|
||||
{
|
||||
// erase_if(static_string& str, UnaryPredicate pred)
|
||||
|
||||
{
|
||||
static_string<3> s{""};
|
||||
BOOST_TEST(erase_if(s, [](char c) { return c == 'a'; }) == 0);
|
||||
BOOST_TEST(s == "");
|
||||
BOOST_TEST(*s.end() == 0);
|
||||
}
|
||||
{
|
||||
static_string<3> s{"aaa"};
|
||||
BOOST_TEST(erase_if(s, [](char c) { return c == 'a'; }) == 3);
|
||||
BOOST_TEST(s == "");
|
||||
BOOST_TEST(*s.end() == 0);
|
||||
}
|
||||
{
|
||||
static_string<3> s{"abc"};
|
||||
BOOST_TEST(erase_if(s, [](char c) { return c == 'a'; }) == 1);
|
||||
BOOST_TEST(s == "bc");
|
||||
BOOST_TEST(*s.end() == 0);
|
||||
}
|
||||
{
|
||||
static_string<3> s{"abc"};
|
||||
BOOST_TEST(erase_if(s, [](char c) { return c == 'b'; }) == 1);
|
||||
BOOST_TEST(s == "ac");
|
||||
BOOST_TEST(*s.end() == 0);
|
||||
}
|
||||
{
|
||||
static_string<3> s{"abc"};
|
||||
BOOST_TEST(erase_if(s, [](char c) { return c == 'c'; }) == 1);
|
||||
BOOST_TEST(s == "ab");
|
||||
BOOST_TEST(*s.end() == 0);
|
||||
}
|
||||
{
|
||||
static_string<3> s{"abc"};
|
||||
BOOST_TEST(erase_if(s, [](char c) { return c == 'd'; }) == 0);
|
||||
BOOST_TEST(s == "abc");
|
||||
BOOST_TEST(*s.end() == 0);
|
||||
}
|
||||
}
|
||||
|
||||
// done
|
||||
static
|
||||
void
|
||||
@ -3708,7 +3754,7 @@ testToStaticString()
|
||||
BOOST_TEST(testTS(std::numeric_limits<unsigned long long>::max()));
|
||||
BOOST_TEST(testTS(std::numeric_limits<long double>::min()));
|
||||
BOOST_TEST(testTS(std::numeric_limits<float>::min()));
|
||||
|
||||
|
||||
// these tests technically are not portable, but they will work
|
||||
// 99% of the time.
|
||||
{
|
||||
@ -4090,7 +4136,7 @@ testFind()
|
||||
|
||||
BOOST_TEST(fs1.rfind(cs1, 0) == 0);
|
||||
BOOST_TEST(fs1.rfind(cs2, 0) == S::npos);
|
||||
|
||||
|
||||
BOOST_TEST(fs1.rfind(cs2, 0, 2) == S::npos);
|
||||
BOOST_TEST(fs1.rfind(cs1, 4) == 0);
|
||||
|
||||
@ -5068,7 +5114,7 @@ testFind()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// find_first_not_of
|
||||
|
||||
const char* cs3 = "12456";
|
||||
@ -5917,7 +5963,7 @@ testReplace()
|
||||
std::stringstream a("defghi");
|
||||
static_string<30> b = "abcabcdefjklmnop";
|
||||
BOOST_TEST(b.replace(b.begin() + 3, b.begin() + 9,
|
||||
std::istream_iterator<char>(a),
|
||||
std::istream_iterator<char>(a),
|
||||
std::istream_iterator<char>()) ==
|
||||
"abcdefghijklmnop");
|
||||
}
|
||||
@ -6130,7 +6176,7 @@ testReplace()
|
||||
BOOST_TEST(testR(S("abcde"), 5, 1, 5, '2', S("abcde22222")));
|
||||
BOOST_TEST(testR(S("abcde"), 5, 1, 10, '2', S("abcde2222222222")));
|
||||
BOOST_TEST(testR(S("abcde"), 5, 1, 20, '2', S("abcde22222222222222222222")));
|
||||
|
||||
|
||||
BOOST_TEST(testR(S("abcde"), 0, 4, "12345", 4, S("1234e")));
|
||||
BOOST_TEST(testR(S("abcde"), 0, 4, "12345", 5, S("12345e")));
|
||||
BOOST_TEST(testR(S("abcde"), 0, 4, "1234567890", 0, S("e")));
|
||||
@ -7159,18 +7205,19 @@ runTests()
|
||||
static_cast<void>(cxper);
|
||||
|
||||
testConstruct();
|
||||
|
||||
|
||||
testAssignment();
|
||||
|
||||
|
||||
testElements();
|
||||
|
||||
testIterators();
|
||||
|
||||
|
||||
testCapacity();
|
||||
|
||||
testClear();
|
||||
testInsert();
|
||||
testErase();
|
||||
testEraseIf();
|
||||
testPushBack();
|
||||
testPopBack();
|
||||
testAppend();
|
||||
|
Reference in New Issue
Block a user