From 3837e36d71c6fb259ff8e4e38e3b871a51a0487b Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Tue, 2 Sep 2025 13:51:45 +0100 Subject: [PATCH] Fixes to GCC -O2 errors --- .gitignore | 1 + include/etl/basic_string.h | 282 ++++--- include/etl/string.h | 90 +- include/etl/string_view.h | 2 +- include/etl/u16string.h | 115 ++- include/etl/u32string.h | 116 ++- include/etl/u8string.h | 113 ++- include/etl/wstring.h | 114 ++- test/CMakeLists.txt | 331 -------- test/test_string_char.cpp | 26 +- test/test_string_char_external_buffer.cpp | 29 +- test/test_string_u16.cpp | 26 +- test/test_string_u16_external_buffer.cpp | 26 +- test/test_string_u32.cpp | 26 +- test/test_string_u32_external_buffer.cpp | 26 +- test/test_string_u8.cpp | 26 +- test/test_string_u8_external_buffer.cpp | 35 +- test/test_string_wchar_t.cpp | 26 +- test/test_string_wchar_t_external_buffer.cpp | 26 +- test/vs2022/etl.sln | 12 + test/vs2022/etl.vcxproj | 824 +++++++++++++++++++ version.txt | 2 +- 22 files changed, 1571 insertions(+), 703 deletions(-) diff --git a/.gitignore b/.gitignore index 67e5983d..344d9f3c 100644 --- a/.gitignore +++ b/.gitignore @@ -408,3 +408,4 @@ examples/UniquePtrWithPool/cmake_install.cmake examples/UniquePtrWithPool/Makefile examples/UniquePtrWithPool/CMakeCache.txt examples/UniquePtrWithPool/UniquePtrWithPool +test/vs2022/Debug Clang C++20 - Optimised -O2 diff --git a/include/etl/basic_string.h b/include/etl/basic_string.h index 934af455..e2f76213 100644 --- a/include/etl/basic_string.h +++ b/include/etl/basic_string.h @@ -678,6 +678,7 @@ namespace etl { if (&other != this) { + clear(); append_impl(begin(), other.begin(), other.end(), other.is_truncated(), other.is_secure()); } } @@ -693,6 +694,8 @@ namespace etl { if (&other != this) { + clear(); + if (sublength == npos) { sublength = other.size() - subposition; @@ -727,6 +730,17 @@ namespace etl append_impl(begin(), str, false, false); } + //********************************************************************* + /// Assigns values to the string. + /// Truncates if the string does not have enough free space. + ///\param other The other string. + //********************************************************************* + template + void assign(const value_type (&literal)[Size]) + { + append_impl(begin(), literal, Size, false, false); + } + //********************************************************************* /// Assigns values to the string. /// Truncates if the string does not have enough free space. @@ -1676,13 +1690,7 @@ namespace etl // Limit the length. length_ = etl::min(length_, size() - position); - // Erase the bit we want to replace. - erase(position, length_); - - // Insert the new stuff. - insert(position, str); - - return *this; + return replace_impl(begin() + position, begin() + position + length_, str.begin(), str.size(), str.is_truncated()); } //********************************************************************* @@ -1699,13 +1707,7 @@ namespace etl // Limit the length. length_ = etl::min(length_, size() - position); - // Erase the bit we want to replace. - erase(position, length_); - - // Insert the new stuff. - insert(position, view); - - return *this; + return replace_impl(begin() + position, begin() + position + length_, view.begin(), view.size(), false); } //********************************************************************* @@ -1716,28 +1718,7 @@ namespace etl //********************************************************************* ibasic_string& replace(const_iterator first, const_iterator last, const ibasic_string& str) { - // Quick hack, as iterators are pointers. - iterator first_ = to_iterator(first); - iterator last_ = to_iterator(last); - - // Erase the bit we want to replace. - erase(first_, last_); - - // Insert the new stuff. - insert(first_, str.begin(), str.end()); - -#if ETL_HAS_STRING_TRUNCATION_CHECKS - if (str.is_truncated()) - { - set_truncated(true); - -#if ETL_HAS_ERROR_ON_STRING_TRUNCATION - ETL_ASSERT_FAIL(ETL_ERROR(string_truncation)); -#endif - } -#endif - - return *this; + return replace_impl(first, last, str.begin(), str.size(), str.is_truncated()); } //********************************************************************* @@ -1749,17 +1730,7 @@ namespace etl template ibasic_string& replace(const_iterator first, const_iterator last, const etl::basic_string_view& view) { - // Quick hack, as iterators are pointers. - iterator first_ = to_iterator(first); - iterator last_ = to_iterator(last); - - // Erase the bit we want to replace. - erase(first_, last_); - - // Insert the new stuff. - insert(first_, view.begin(), view.end()); - - return *this; + return replace_impl(first, last, view.begin(), view.size(), false); } //********************************************************************* @@ -1773,25 +1744,8 @@ namespace etl // Limit the lengths. length_ = etl::min(length_, size() - position); sublength = etl::min(sublength, str.size() - subposition); - - // Erase the bit we want to replace. - erase(position, length_); - - // Insert the new stuff. - insert(position, str, subposition, sublength); - -#if ETL_HAS_STRING_TRUNCATION_CHECKS - if (str.is_truncated()) - { - set_truncated(true); - -#if ETL_HAS_ERROR_ON_STRING_TRUNCATION - ETL_ASSERT_FAIL(ETL_ERROR(string_truncation)); -#endif - } -#endif - - return *this; + + return replace_impl(begin() + position, begin() + position + length_, str.begin() + subposition, sublength, str.is_truncated()); } //********************************************************************* @@ -1807,13 +1761,7 @@ namespace etl length_ = etl::min(length_, size() - position); sublength = etl::min(sublength, view.size() - subposition); - // Erase the bit we want to replace. - erase(position, length_); - - // Insert the new stuff. - insert(position, view, subposition, sublength); - - return *this; + return replace_impl(begin() + position, begin() + position + length_, view.begin() + subposition, sublength, false); } //********************************************************************* @@ -1826,31 +1774,40 @@ namespace etl // Limit the length. length_ = etl::min(length_, size() - position); - // Erase the bit we want to replace. - erase(position, length_); - - // Insert the new stuff. - insert(position, s, etl::strlen(s)); - - return *this; + return replace_impl(begin() + position, begin() + position + length_, s, etl::strlen(s), false); } //********************************************************************* - /// Replace characters from 'first' 'last' with pointed to string. + /// Replace characters in the range [first, last) with the first 'n' + /// characters from the C string 's'. + ///\param first Iterator to first character to replace. + ///\param last Iterator one past last character to replace. + ///\param s Pointer to source character buffer (may be non-null + /// terminated and may contain embedded nulls). + ///\param n Number of characters from 's' to insert. //********************************************************************* - ibasic_string& replace(const_iterator first, const_iterator last, const_pointer s) + ibasic_string& replace(const_iterator first, const_iterator last, const_pointer s, size_type n) { - // Quick hack, as iterators are pointers. - iterator first_ = to_iterator(first); - iterator last_ = to_iterator(last); + return replace_impl(first, last, s, n, false); + } - // Erase the bit we want to replace. - erase(first_, last_); + //********************************************************************* + /// Replace characters from 'first' to 'last' with pointed to string. + //********************************************************************* + template + typename etl::enable_if::value, ibasic_string>::type& + replace(const_iterator first, const_iterator last, TIterator s) + { + return replace_impl(first, last, s, etl::strlen(s), false); + } - // Insert the new stuff. - insert(first_, s, s + etl::strlen(s)); - - return *this; + //********************************************************************* + /// Replace characters from 'first' 'last' with pointed to literal string. + //********************************************************************* + template + ibasic_string& replace(const_iterator first, const_iterator last, const value_type (&literal)[Size]) + { + return replace_impl(first, last, literal, Size, false); } //********************************************************************* @@ -1863,31 +1820,7 @@ namespace etl // Limit the length. length_ = etl::min(length_, size() - position); - // Erase the bit we want to replace. - erase(position, length_); - - // Insert the new stuff. - insert(position, s, n); - - return *this; - } - - //********************************************************************* - /// Replace characters from 'first' to 'last' with 'n' characters from pointed to string. - //********************************************************************* - ibasic_string& replace(const_iterator first, const_iterator last, const_pointer s, size_type n) - { - // Quick hack, as iterators are pointers. - iterator first_ = to_iterator(first); - iterator last_ = to_iterator(last); - - // Erase the bit we want to replace. - erase(first_, last_); - - // Insert the new stuff. - insert(first_, s, s + n); - - return *this; + return replace_impl(begin() + position, begin() + position + length_, s, n, false); } //********************************************************************* @@ -1916,7 +1849,7 @@ namespace etl { // Quick hack, as iterators are pointers. iterator first_ = to_iterator(first); - iterator last_ = to_iterator(last); + iterator last_ = to_iterator(last); // Erase the bit we want to replace. erase(first_, last_); @@ -1935,7 +1868,7 @@ namespace etl { // Quick hack, as iterators are pointers. iterator first_ = to_iterator(first); - iterator last_ = to_iterator(last); + iterator last_ = to_iterator(last); // Erase the bit we want to replace. erase(first_, last_); @@ -2564,6 +2497,111 @@ namespace etl private: + //********************************************************************* + /// Replace characters from 'first' to one before 'last' with the C string + /// at 's' of specified 'length'. + /// This is an optimised single-pass implementation. + //********************************************************************* + ibasic_string& replace_impl(const_iterator first, const_iterator last, const_pointer s, size_type length, bool other_truncated) + { + // Trivial no-op cases + if ((first == last) && (s == ETL_NULLPTR || length == 0U)) + { + return *this; + } + + // Invalid range? + if (first > last) + { + return *this; + } + + // Quick hack, as iterators are pointers. + iterator first_ = to_iterator(first); + iterator last_ = to_iterator(last); + + // If source pointer is inside our current buffer we take the safe + // (legacy) path to preserve correct semantics for overlapping self use. + const bool source_overlaps = (s != ETL_NULLPTR) && + (s >= p_buffer) && + (s < p_buffer + current_size); + + if (source_overlaps) + { + // Legacy behaviour (may be slightly less efficient, but correct). + // Erase range then insert up to 'length' characters from 's'. + erase(first_, last_); + + if (s != ETL_NULLPTR && length != 0U) + { + // 'insert' can truncate & set flags. + insert(p_buffer + (first_ - p_buffer), s, s + length); + } + + return *this; + } + + // Calculate the remove parameters. + const size_type remove_index = size_type(first_ - p_buffer); + const size_type remove_length = size_type(last_ - first_); + const size_type free_space = CAPACITY - remove_index; // Free space is the space from the remove index to the end of the buffer. + + size_type insert_length = (s == ETL_NULLPTR) ? 0U : length; + + // Limit the insert length to the available free space. + if (insert_length > free_space) + { + insert_length = free_space; + } + + // Calculate the tail parameters. + size_type tail_index = remove_index + remove_length; + size_type tail_length = current_size - tail_index; + size_type tail_space = free_space - insert_length; + +#if ETL_HAS_STRING_TRUNCATION_CHECKS + set_truncated((insert_length != length) || (tail_space < tail_length) || is_truncated() || other_truncated); +#endif + + // The some or all of tail may be erased if the space remaining for it is smaller than the tail length. + if (tail_space < tail_length) + { + tail_length = tail_space; + } + + // Three cases: same size, grow, shrink. + if (insert_length == remove_length) + { + // Size unchanged: simple overwrite. + etl::mem_copy(s, insert_length, &p_buffer[remove_index]); + } + else if (insert_length > remove_length) + { + // Grow: shift tail right then copy. + // Shift tail (backwards to handle overlap safely). + etl::mem_move(&p_buffer[tail_index], tail_length, &p_buffer[remove_index + insert_length]); + + // Copy new data. + etl::mem_copy(s, insert_length, &p_buffer[remove_index]); + } + else // insert_length < remove_length + { + // Shrink: overwrite then shift tail left. + // Copy new data. + etl::mem_copy(s, insert_length, &p_buffer[remove_index]); + + // Move tail left. + etl::mem_copy(&p_buffer[tail_index], tail_length, &p_buffer[remove_index + insert_length]); + } + + current_size = remove_index + insert_length + tail_length; + p_buffer[current_size] = value_type(0); + + cleanup(); + + return *this; + } + //************************************************************************* /// Compare helper function //************************************************************************* @@ -2664,6 +2702,14 @@ namespace etl return const_cast(itr); } + //************************************************************************* + /// Checks if a pointer is within the buffer. + //************************************************************************* + bool is_within_buffer(const_pointer ptr) const + { + return (ptr >= p_buffer) && (ptr <= (p_buffer + CAPACITY)); + } + private: //********************************************************************* diff --git a/include/etl/string.h b/include/etl/string.h index 4662afff..61101d06 100644 --- a/include/etl/string.h +++ b/include/etl/string.h @@ -312,8 +312,15 @@ namespace etl string_ext(const etl::string_ext& other, value_type* buffer, size_type buffer_size) : istring(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -323,8 +330,15 @@ namespace etl string_ext(const etl::istring& other, value_type* buffer, size_type buffer_size) : istring(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -338,19 +352,26 @@ namespace etl { ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds)); - this->initialise(); - this->assign(other, position, length); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other, position, length); + } } //************************************************************************* /// Constructor, from null terminated text. ///\param text The initial text of the string_ext. //************************************************************************* - string_ext(const char* text, char* buffer, size_type buffer_size) + template ::value, int>::type> + string_ext(TPointer text, value_type* buffer, size_type buffer_size) : istring(buffer, buffer_size - 1U) { - // Is the initial text at the same address as the buffer? - if (text == buffer) + if (this->is_within_buffer(text)) { this->current_size = etl::strlen(buffer); } @@ -361,6 +382,25 @@ namespace etl } } + //************************************************************************* + /// Constructor, from null terminated literal text. + ///\param text The initial text of the string_ext. + //************************************************************************* + template + string_ext(const value_type (&literal)[Size], value_type* buffer, size_type buffer_size) + : istring(buffer, buffer_size - 1U) + { + if (this->is_within_buffer(literal)) + { + this->current_size = etl::strlen(literal); + } + else + { + this->initialise(); + this->assign(literal); + } + } + //************************************************************************* /// Constructor, from null terminated text and count. ///\param text The initial text of the string_ext. @@ -369,8 +409,15 @@ namespace etl string_ext(const value_type* text, size_type count, value_type* buffer, size_type buffer_size) : istring(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(text, text + count); + if (this->is_within_buffer(text)) + { + this->current_size = count; + } + else + { + this->initialise(); + this->assign(text, text + count); + } } //************************************************************************* @@ -392,7 +439,15 @@ namespace etl explicit string_ext(const etl::string_view& view, value_type* buffer, size_type buffer_size) : istring(buffer, buffer_size - 1U) { - this->assign(view.begin(), view.end()); + if (this->is_within_buffer(view.data())) + { + this->current_size = view.size(); + } + else + { + this->initialise(); + this->assign(view.begin(), view.end()); + } } //************************************************************************* @@ -405,7 +460,15 @@ namespace etl string_ext(TIterator first, TIterator last, value_type* buffer, size_type buffer_size, typename etl::enable_if::value, int>::type = 0) : istring(buffer, buffer_size - 1U) { - this->assign(first, last); + if (this->is_within_buffer(etl::addressof(*first))) + { + this->current_size = etl::distance(first, last); + } + else + { + this->initialise(); + this->assign(first, last); + } } #if ETL_HAS_INITIALIZER_LIST @@ -415,6 +478,7 @@ namespace etl string_ext(std::initializer_list init, value_type* buffer, size_type buffer_size) : istring(buffer, buffer_size - 1U) { + this->initialise(); this->assign(init.begin(), init.end()); } #endif diff --git a/include/etl/string_view.h b/include/etl/string_view.h index b285de94..f9519379 100644 --- a/include/etl/string_view.h +++ b/include/etl/string_view.h @@ -366,7 +366,7 @@ namespace etl { n = etl::min(count, size() - position); - etl::mem_move(mbegin + position, n, destination); + etl::mem_copy(mbegin + position, n, destination); } return n; diff --git a/include/etl/u16string.h b/include/etl/u16string.h index 279405bb..8da35cd0 100644 --- a/include/etl/u16string.h +++ b/include/etl/u16string.h @@ -263,8 +263,8 @@ namespace etl }; //*************************************************************************** - /// A u16string_ex implementation that uses a fixed external buffer. - ///\ingroup u16string + /// A string implementation that uses a fixed size external buffer. + ///\ingroup string //*************************************************************************** class u16string_ext : public iu16string { @@ -274,6 +274,7 @@ namespace etl typedef iu16string interface_type; typedef iu16string::value_type value_type; + typedef iu16string::size_type size_type; //************************************************************************* /// Constructor. @@ -291,8 +292,15 @@ namespace etl u16string_ext(const etl::u16string_ext& other, value_type* buffer, size_type buffer_size) : iu16string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -302,8 +310,15 @@ namespace etl u16string_ext(const etl::iu16string& other, value_type* buffer, size_type buffer_size) : iu16string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -317,19 +332,26 @@ namespace etl { ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds)); - this->initialise(); - this->assign(other, position, length); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other, position, length); + } } //************************************************************************* /// Constructor, from null terminated text. ///\param text The initial text of the u16string_ext. //************************************************************************* - u16string_ext(const value_type* text, value_type* buffer, size_type buffer_size) + template ::value, int>::type> + u16string_ext(TPointer text, char* buffer, size_type buffer_size) : iu16string(buffer, buffer_size - 1U) { - // Is the initial text at the same address as the buffer? - if (text == buffer) + if (this->is_within_buffer(text)) { this->current_size = etl::strlen(buffer); } @@ -340,6 +362,25 @@ namespace etl } } + //************************************************************************* + /// Constructor, from null terminated literal text. + ///\param text The initial text of the u16string_ext. + //************************************************************************* + template + u16string_ext(const value_type (&literal)[Size], value_type* buffer, size_type buffer_size) + : iu16string(buffer, buffer_size - 1U) + { + if (this->is_within_buffer(literal)) + { + this->current_size = etl::strlen(literal); + } + else + { + this->initialise(); + this->assign(literal); + } + } + //************************************************************************* /// Constructor, from null terminated text and count. ///\param text The initial text of the u16string_ext. @@ -348,8 +389,15 @@ namespace etl u16string_ext(const value_type* text, size_type count, value_type* buffer, size_type buffer_size) : iu16string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(text, text + count); + if (this->is_within_buffer(text)) + { + this->current_size = count; + } + else + { + this->initialise(); + this->assign(text, text + count); + } } //************************************************************************* @@ -364,6 +412,24 @@ namespace etl this->resize(count, c); } + //************************************************************************* + /// From u16string_view. + ///\param view The u16string_view. + //************************************************************************* + explicit u16string_ext(const etl::u16string_view& view, value_type* buffer, size_type buffer_size) + : iu16string(buffer, buffer_size - 1U) + { + if (this->is_within_buffer(view.data())) + { + this->current_size = view.size(); + } + else + { + this->initialise(); + this->assign(view.begin(), view.end()); + } + } + //************************************************************************* /// Constructor, from an iterator range. ///\tparam TIterator The iterator type. @@ -374,8 +440,15 @@ namespace etl u16string_ext(TIterator first, TIterator last, value_type* buffer, size_type buffer_size, typename etl::enable_if::value, int>::type = 0) : iu16string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(first, last); + if (this->is_within_buffer(etl::addressof(*first))) + { + this->current_size = etl::distance(first, last); + } + else + { + this->initialise(); + this->assign(first, last); + } } #if ETL_HAS_INITIALIZER_LIST @@ -385,21 +458,11 @@ namespace etl u16string_ext(std::initializer_list init, value_type* buffer, size_type buffer_size) : iu16string(buffer, buffer_size - 1U) { + this->initialise(); this->assign(init.begin(), init.end()); } #endif - //************************************************************************* - /// From string_view. - ///\param view The string_view. - //************************************************************************* - explicit u16string_ext(const etl::u16string_view& view, value_type* buffer, size_type buffer_size) - : iu16string(buffer, buffer_size - 1U) - { - this->initialise(); - this->assign(view.begin(), view.end()); - } - //************************************************************************* /// Assignment operator. //************************************************************************* diff --git a/include/etl/u32string.h b/include/etl/u32string.h index fa80186f..17c49e06 100644 --- a/include/etl/u32string.h +++ b/include/etl/u32string.h @@ -263,8 +263,8 @@ namespace etl }; //*************************************************************************** - /// A u32string implementation that uses a fixed size external buffer. - ///\ingroup u32string + /// A string implementation that uses a fixed size external buffer. + ///\ingroup string //*************************************************************************** class u32string_ext : public iu32string { @@ -274,6 +274,7 @@ namespace etl typedef iu32string interface_type; typedef iu32string::value_type value_type; + typedef iu32string::size_type size_type; //************************************************************************* /// Constructor. @@ -291,8 +292,15 @@ namespace etl u32string_ext(const etl::u32string_ext& other, value_type* buffer, size_type buffer_size) : iu32string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -302,8 +310,15 @@ namespace etl u32string_ext(const etl::iu32string& other, value_type* buffer, size_type buffer_size) : iu32string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -317,21 +332,28 @@ namespace etl { ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds)); - this->initialise(); - this->assign(other, position, length); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other, position, length); + } } //************************************************************************* /// Constructor, from null terminated text. ///\param text The initial text of the u32string_ext. //************************************************************************* - ETL_EXPLICIT_STRING_FROM_CHAR u32string_ext(const value_type* text, value_type* buffer, size_type buffer_size) + template ::value, int>::type> + u32string_ext(TPointer text, char* buffer, size_type buffer_size) : iu32string(buffer, buffer_size - 1U) { - // Is the initial text at the same address as the buffer? - if (text == buffer) + if (this->is_within_buffer(text)) { - this->current_size = etl::strlen(buffer);; + this->current_size = etl::strlen(buffer); } else { @@ -340,6 +362,25 @@ namespace etl } } + //************************************************************************* + /// Constructor, from null terminated literal text. + ///\param text The initial text of the u32string_ext. + //************************************************************************* + template + u32string_ext(const value_type (&literal)[Size], value_type* buffer, size_type buffer_size) + : iu32string(buffer, buffer_size - 1U) + { + if (this->is_within_buffer(literal)) + { + this->current_size = etl::strlen(literal); + } + else + { + this->initialise(); + this->assign(literal); + } + } + //************************************************************************* /// Constructor, from null terminated text and count. ///\param text The initial text of the u32string_ext. @@ -348,8 +389,15 @@ namespace etl u32string_ext(const value_type* text, size_type count, value_type* buffer, size_type buffer_size) : iu32string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(text, text + count); + if (this->is_within_buffer(text)) + { + this->current_size = count; + } + else + { + this->initialise(); + this->assign(text, text + count); + } } //************************************************************************* @@ -364,6 +412,24 @@ namespace etl this->resize(count, c); } + //************************************************************************* + /// From u32string_view. + ///\param view The u32string_view. + //************************************************************************* + explicit u32string_ext(const etl::u32string_view& view, value_type* buffer, size_type buffer_size) + : iu32string(buffer, buffer_size - 1U) + { + if (this->is_within_buffer(view.data())) + { + this->current_size = view.size(); + } + else + { + this->initialise(); + this->assign(view.begin(), view.end()); + } + } + //************************************************************************* /// Constructor, from an iterator range. ///\tparam TIterator The iterator type. @@ -374,8 +440,15 @@ namespace etl u32string_ext(TIterator first, TIterator last, value_type* buffer, size_type buffer_size, typename etl::enable_if::value, int>::type = 0) : iu32string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(first, last); + if (this->is_within_buffer(etl::addressof(*first))) + { + this->current_size = etl::distance(first, last); + } + else + { + this->initialise(); + this->assign(first, last); + } } #if ETL_HAS_INITIALIZER_LIST @@ -390,17 +463,6 @@ namespace etl } #endif - //************************************************************************* - /// From string_view. - ///\param view The string_view. - //************************************************************************* - explicit u32string_ext(const etl::u32string_view& view, value_type* buffer, size_type buffer_size) - : iu32string(buffer, buffer_size - 1U) - { - this->initialise(); - this->assign(view.begin(), view.end()); - } - //************************************************************************* /// Assignment operator. //************************************************************************* diff --git a/include/etl/u8string.h b/include/etl/u8string.h index 727750df..9aed486e 100644 --- a/include/etl/u8string.h +++ b/include/etl/u8string.h @@ -283,8 +283,8 @@ namespace etl ETL_CONSTANT size_t u8string::MAX_SIZE; //*************************************************************************** - /// A u8string implementation that uses a fixed size external buffer. - ///\ingroup u8string + /// A string implementation that uses a fixed size external buffer. + ///\ingroup string //*************************************************************************** class u8string_ext : public iu8string { @@ -312,8 +312,15 @@ namespace etl u8string_ext(const etl::u8string_ext& other, value_type* buffer, size_type buffer_size) : iu8string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -323,8 +330,15 @@ namespace etl u8string_ext(const etl::iu8string& other, value_type* buffer, size_type buffer_size) : iu8string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -338,19 +352,26 @@ namespace etl { ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds)); - this->initialise(); - this->assign(other, position, length); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other, position, length); + } } //************************************************************************* /// Constructor, from null terminated text. ///\param text The initial text of the u8string_ext. //************************************************************************* - u8string_ext(const char8_t* text, char8_t* buffer, size_type buffer_size) + template ::value, int>::type> + u8string_ext(TPointer text, char* buffer, size_type buffer_size) : iu8string(buffer, buffer_size - 1U) { - // Is the initial text at the same address as the buffer? - if (text == buffer) + if (this->is_within_buffer(text)) { this->current_size = etl::strlen(buffer); } @@ -361,6 +382,25 @@ namespace etl } } + //************************************************************************* + /// Constructor, from null terminated literal text. + ///\param text The initial text of the u8string_ext. + //************************************************************************* + template + u8string_ext(const value_type (&literal)[Size], value_type* buffer, size_type buffer_size) + : iu8string(buffer, buffer_size - 1U) + { + if (this->is_within_buffer(literal)) + { + this->current_size = etl::strlen(literal); + } + else + { + this->initialise(); + this->assign(literal); + } + } + //************************************************************************* /// Constructor, from null terminated text and count. ///\param text The initial text of the u8string_ext. @@ -369,8 +409,15 @@ namespace etl u8string_ext(const value_type* text, size_type count, value_type* buffer, size_type buffer_size) : iu8string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(text, text + count); + if (this->is_within_buffer(text)) + { + this->current_size = count; + } + else + { + this->initialise(); + this->assign(text, text + count); + } } //************************************************************************* @@ -385,6 +432,24 @@ namespace etl this->resize(count, c); } + //************************************************************************* + /// From u8string_view. + ///\param view The u8string_view. + //************************************************************************* + explicit u8string_ext(const etl::u8string_view& view, value_type* buffer, size_type buffer_size) + : iu8string(buffer, buffer_size - 1U) + { + if (this->is_within_buffer(view.data())) + { + this->current_size = view.size(); + } + else + { + this->initialise(); + this->assign(view.begin(), view.end()); + } + } + //************************************************************************* /// Constructor, from an iterator range. ///\tparam TIterator The iterator type. @@ -395,8 +460,15 @@ namespace etl u8string_ext(TIterator first, TIterator last, value_type* buffer, size_type buffer_size, typename etl::enable_if::value, int>::type = 0) : iu8string(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(first, last); + if (this->is_within_buffer(etl::addressof(*first))) + { + this->current_size = etl::distance(first, last); + } + else + { + this->initialise(); + this->assign(first, last); + } } #if ETL_HAS_INITIALIZER_LIST @@ -411,17 +483,6 @@ namespace etl } #endif - //************************************************************************* - /// From string_view. - ///\param view The string_view. - //************************************************************************* - explicit u8string_ext(const etl::u8string_view& view, value_type* buffer, size_type buffer_size) - : iu8string(buffer, buffer_size - 1U) - { - this->initialise(); - this->assign(view.begin(), view.end()); - } - //************************************************************************* /// Assignment operator. //************************************************************************* diff --git a/include/etl/wstring.h b/include/etl/wstring.h index 67a1053b..157604f3 100644 --- a/include/etl/wstring.h +++ b/include/etl/wstring.h @@ -263,8 +263,8 @@ namespace etl }; //*************************************************************************** - /// A wstring implementation that uses a fixed size external buffer. - ///\ingroup wstring + /// A string implementation that uses a fixed size external buffer. + ///\ingroup string //*************************************************************************** class wstring_ext : public iwstring { @@ -274,6 +274,7 @@ namespace etl typedef iwstring interface_type; typedef iwstring::value_type value_type; + typedef iwstring::size_type size_type; //************************************************************************* /// Constructor. @@ -291,8 +292,15 @@ namespace etl wstring_ext(const etl::wstring_ext& other, value_type* buffer, size_type buffer_size) : iwstring(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -302,8 +310,15 @@ namespace etl wstring_ext(const etl::iwstring& other, value_type* buffer, size_type buffer_size) : iwstring(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(other); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other); + } } //************************************************************************* @@ -317,19 +332,26 @@ namespace etl { ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds)); - this->initialise(); - this->assign(other, position, length); + if (this->is_within_buffer(other.data())) + { + this->current_size = other.size(); + } + else + { + this->initialise(); + this->assign(other, position, length); + } } //************************************************************************* /// Constructor, from null terminated text. ///\param text The initial text of the wstring_ext. //************************************************************************* - wstring_ext(const value_type* text, value_type* buffer, size_type buffer_size) + template ::value, int>::type> + wstring_ext(TPointer text, char* buffer, size_type buffer_size) : iwstring(buffer, buffer_size - 1U) { - // Is the initial text at the same address as the buffer? - if (text == buffer) + if (this->is_within_buffer(text)) { this->current_size = etl::strlen(buffer); } @@ -340,6 +362,25 @@ namespace etl } } + //************************************************************************* + /// Constructor, from null terminated literal text. + ///\param text The initial text of the wstring_ext. + //************************************************************************* + template + wstring_ext(const value_type (&literal)[Size], value_type* buffer, size_type buffer_size) + : iwstring(buffer, buffer_size - 1U) + { + if (this->is_within_buffer(literal)) + { + this->current_size = etl::strlen(literal); + } + else + { + this->initialise(); + this->assign(literal); + } + } + //************************************************************************* /// Constructor, from null terminated text and count. ///\param text The initial text of the wstring_ext. @@ -348,8 +389,15 @@ namespace etl wstring_ext(const value_type* text, size_type count, value_type* buffer, size_type buffer_size) : iwstring(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(text, text + count); + if (this->is_within_buffer(text)) + { + this->current_size = count; + } + else + { + this->initialise(); + this->assign(text, text + count); + } } //************************************************************************* @@ -364,6 +412,24 @@ namespace etl this->resize(count, c); } + //************************************************************************* + /// From wstring_view. + ///\param view The wstring_view. + //************************************************************************* + explicit wstring_ext(const etl::wstring_view& view, value_type* buffer, size_type buffer_size) + : iwstring(buffer, buffer_size - 1U) + { + if (this->is_within_buffer(view.data())) + { + this->current_size = view.size(); + } + else + { + this->initialise(); + this->assign(view.begin(), view.end()); + } + } + //************************************************************************* /// Constructor, from an iterator range. ///\tparam TIterator The iterator type. @@ -374,8 +440,15 @@ namespace etl wstring_ext(TIterator first, TIterator last, value_type* buffer, size_type buffer_size, typename etl::enable_if::value, int>::type = 0) : iwstring(buffer, buffer_size - 1U) { - this->initialise(); - this->assign(first, last); + if (this->is_within_buffer(etl::addressof(*first))) + { + this->current_size = etl::distance(first, last); + } + else + { + this->initialise(); + this->assign(first, last); + } } #if ETL_HAS_INITIALIZER_LIST @@ -390,17 +463,6 @@ namespace etl } #endif - //************************************************************************* - /// From string_view. - ///\param view The string_view. - //************************************************************************* - explicit wstring_ext(const etl::wstring_view& view, value_type* buffer, size_type buffer_size) - : iwstring(buffer, buffer_size - 1U) - { - this->initialise(); - this->assign(view.begin(), view.end()); - } - //************************************************************************* /// Assignment operator. //************************************************************************* diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 61c01e47..5840bb35 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -12,347 +12,16 @@ project(etl_unit_tests LANGUAGES CXX) add_executable(etl_tests main.cpp - murmurhash3.cpp - test_algorithm.cpp - test_alignment.cpp - test_array.cpp - test_array_view.cpp - test_array_wrapper.cpp - test_atomic.cpp - test_base64_RFC2152_decoder.cpp - test_base64_RFC2152_encoder.cpp - test_base64_RFC3501_decoder.cpp - test_base64_RFC3501_encoder.cpp - test_base64_RFC4648_decoder_with_no_padding.cpp - test_base64_RFC4648_decoder_with_padding.cpp - test_base64_RFC4648_encoder_with_no_padding.cpp - test_base64_RFC4648_encoder_with_padding.cpp - test_base64_RFC4648_URL_decoder_with_no_padding.cpp - test_base64_RFC4648_URL_decoder_with_padding.cpp - test_base64_RFC4648_URL_encoder_with_no_padding.cpp - test_base64_RFC4648_URL_encoder_with_padding.cpp - test_binary.cpp - test_bip_buffer_spsc_atomic.cpp - test_bit.cpp - test_bitset_legacy.cpp - test_bitset_new_comparisons.cpp - test_bitset_new_default_element_type.cpp - test_bitset_new_explicit_single_element_type.cpp - test_bitset_new_ext_default_element_type.cpp - test_bitset_new_ext_explicit_single_element_type.cpp - test_bit_stream.cpp - test_bit_stream_reader_big_endian.cpp - test_bit_stream_reader_little_endian.cpp - test_bit_stream_writer_big_endian.cpp - test_bit_stream_writer_little_endian.cpp - test_bloom_filter.cpp - test_bresenham_line.cpp - test_bsd_checksum.cpp - test_buffer_descriptors.cpp - test_byte.cpp - test_byte_stream.cpp - test_callback_service.cpp - test_callback_timer.cpp - test_callback_timer_atomic.cpp - test_callback_timer_deferred_locked.cpp - test_callback_timer_interrupt.cpp - test_callback_timer_locked.cpp - test_const_map.cpp - test_const_map_constexpr.cpp - test_const_multimap.cpp - test_const_multimap_constexpr.cpp - test_char_traits.cpp - test_checksum.cpp - test_chrono_clocks.cpp - test_chrono_day.cpp - test_chrono_duration.cpp - test_chrono_hh_mm_ss.cpp - test_chrono_literals.cpp - test_chrono_month.cpp - test_chrono_month_day.cpp - test_chrono_month_day_last.cpp - test_chrono_month_weekday.cpp - test_chrono_month_weekday_last.cpp - test_chrono_operators.cpp - test_chrono_time_point.cpp - test_chrono_weekday.cpp - test_chrono_weekday_indexed.cpp - test_chrono_weekday_last.cpp - test_chrono_year.cpp - test_chrono_year_month.cpp - test_chrono_year_month_day.cpp - test_chrono_year_month_day_last.cpp - test_chrono_year_month_weekday.cpp - test_chrono_year_month_weekday_last.cpp - test_circular_buffer.cpp - test_circular_buffer_external_buffer.cpp - test_circular_iterator.cpp - test_closure.cpp - test_closure_constexpr.cpp - test_compare.cpp - test_constant.cpp - test_container.cpp - test_correlation.cpp - test_covariance.cpp - test_crc1.cpp - test_crc16.cpp - test_crc16_a.cpp - test_crc16_arc.cpp - test_crc16_aug_ccitt.cpp - test_crc16_buypass.cpp - test_crc16_ccitt.cpp - test_crc16_cdma2000.cpp - test_crc16_dds110.cpp - test_crc16_dectr.cpp - test_crc16_dectx.cpp - test_crc16_dnp.cpp - test_crc16_en13757.cpp - test_crc16_genibus.cpp - test_crc16_kermit.cpp - test_crc16_m17.cpp - test_crc16_maxim.cpp - test_crc16_mcrf4xx.cpp - test_crc16_modbus.cpp - test_crc16_opensafety_a.cpp - test_crc16_opensafety_b.cpp - test_crc16_profibus.cpp - test_crc16_riello.cpp - test_crc16_t10dif.cpp - test_crc16_teledisk.cpp - test_crc16_tms37157.cpp - test_crc16_usb.cpp - test_crc16_x25.cpp - test_crc16_xmodem.cpp - test_crc32.cpp - test_crc32_bzip2.cpp - test_crc32_c.cpp - test_crc32_d.cpp - test_crc32_jamcrc.cpp - test_crc32_mpeg2.cpp - test_crc32_posix.cpp - test_crc32_q.cpp - test_crc32_xfer.cpp - test_crc64_ecma.cpp - test_crc64_iso.cpp - test_crc8_ccitt.cpp - test_crc8_cdma2000.cpp - test_crc8_darc.cpp - test_crc8_dvbs2.cpp - test_crc8_ebu.cpp - test_crc8_icode.cpp - test_crc8_itu.cpp - test_crc8_j1850.cpp - test_crc8_j1850_zero.cpp - test_crc8_maxim.cpp - test_crc8_nrsc5.cpp - test_crc8_opensafety.cpp - test_crc8_rohc.cpp - test_crc8_wcdma.cpp - test_crc8_nrsc5.cpp - test_cyclic_value.cpp - test_debounce.cpp - test_delegate.cpp - test_delegate_cpp03.cpp - test_delegate_observable.cpp - test_delegate_service.cpp - test_delegate_service_compile_time.cpp - test_delegate_service_cpp03.cpp - test_deque.cpp - test_endian.cpp - test_enum_type.cpp - test_error_handler.cpp - test_etl_traits.cpp - test_exception.cpp - test_expected.cpp - test_fixed_iterator.cpp - test_fixed_sized_memory_block_allocator.cpp - test_flags.cpp - test_flat_map.cpp - test_flat_multimap.cpp - test_flat_multiset.cpp - test_flat_set.cpp - test_fnv_1.cpp - test_format_spec.cpp - test_forward_list.cpp - test_forward_list_shared_pool.cpp - test_fsm.cpp - test_function.cpp - test_functional.cpp - test_function_traits.cpp - test_gamma.cpp - test_hash.cpp - test_hfsm.cpp - test_hfsm_recurse_to_inner_state_on_start.cpp - test_histogram.cpp - test_index_of_type.cpp - test_indirect_vector.cpp - test_indirect_vector_external_buffer.cpp - test_instance_count.cpp - test_integral_limits.cpp - test_intrusive_forward_list.cpp - test_intrusive_links.cpp - test_intrusive_list.cpp - test_intrusive_queue.cpp - test_intrusive_stack.cpp - test_invert.cpp - test_io_port.cpp - test_iterator.cpp - test_jenkins.cpp - test_largest.cpp - test_limiter.cpp - test_limits.cpp - test_list.cpp - test_list_shared_pool.cpp - test_macros.cpp - test_make_string.cpp - test_map.cpp - test_math.cpp - test_math_functions.cpp - test_mean.cpp - test_memory.cpp - test_mem_cast.cpp - test_mem_cast_ptr.cpp - test_message.cpp - test_message_broker.cpp - test_message_bus.cpp - test_message_packet.cpp - test_message_router.cpp - test_message_router_registry.cpp - test_message_timer.cpp - test_message_timer_atomic.cpp - test_message_timer_interrupt.cpp - test_message_timer_locked.cpp - test_multimap.cpp - test_multiset.cpp - test_multi_array.cpp - test_multi_range.cpp - test_multi_span.cpp - test_multi_vector.cpp - test_murmur3.cpp - test_not_null_pointer.cpp - test_not_null_pointer_constexpr.cpp - test_not_null_unique_pointer.cpp - test_nth_type.cpp - test_numeric.cpp - test_observer.cpp - test_optional.cpp - test_overload.cpp - test_packet.cpp - test_parameter_pack.cpp - test_parameter_type.cpp - test_parity_checksum.cpp - test_pearson.cpp - test_poly_span_dynamic_extent.cpp - test_poly_span_fixed_extent.cpp - test_pool.cpp - test_pool_external_buffer.cpp - test_priority_queue.cpp - test_pseudo_moving_average.cpp - test_quantize.cpp - test_queue.cpp - test_queue_lockable.cpp - test_queue_lockable_small.cpp - test_queue_memory_model_small.cpp - test_queue_mpmc_mutex.cpp - test_queue_mpmc_mutex_small.cpp - test_queue_spsc_atomic.cpp - test_queue_spsc_atomic_small.cpp - test_queue_spsc_isr.cpp - test_queue_spsc_isr_small.cpp - test_queue_spsc_locked.cpp - test_queue_spsc_locked_small.cpp - test_random.cpp - test_ratio.cpp - test_reference_flat_map.cpp - test_reference_flat_multimap.cpp - test_reference_flat_multiset.cpp - test_reference_flat_set.cpp - test_rescale.cpp - test_result.cpp - test_rms.cpp - test_rounded_integral_division.cpp - test_scaled_rounding.cpp - test_set.cpp - test_shared_message.cpp - test_singleton.cpp - test_singleton_base.cpp - test_smallest.cpp - test_span_dynamic_extent.cpp - test_span_fixed_extent.cpp - test_stack.cpp - test_standard_deviation.cpp - test_state_chart.cpp - test_state_chart_compile_time.cpp - test_state_chart_compile_time_with_data_parameter.cpp - test_state_chart_with_data_parameter.cpp - test_state_chart_with_rvalue_data_parameter.cpp test_string_char.cpp test_string_char_external_buffer.cpp - test_string_stream.cpp - test_string_stream_u16.cpp - test_string_stream_u32.cpp - test_string_stream_u8.cpp - test_string_stream_wchar_t.cpp test_string_u16.cpp test_string_u16_external_buffer.cpp test_string_u32.cpp test_string_u32_external_buffer.cpp test_string_u8.cpp test_string_u8_external_buffer.cpp - test_string_utilities.cpp - test_string_utilities_std.cpp - test_string_utilities_std_u16.cpp - test_string_utilities_std_u32.cpp - test_string_utilities_std_u8.cpp - test_string_utilities_std_wchar_t.cpp - test_string_utilities_u16.cpp - test_string_utilities_u32.cpp - test_string_utilities_u8.cpp - test_string_utilities_wchar_t.cpp - test_string_view.cpp test_string_wchar_t.cpp test_string_wchar_t_external_buffer.cpp - test_successor.cpp - test_task_scheduler.cpp - test_threshold.cpp - test_to_arithmetic.cpp - test_to_arithmetic_u16.cpp - test_to_arithmetic_u32.cpp - test_to_arithmetic_u8.cpp - test_to_arithmetic_wchar_t.cpp - test_to_string.cpp - test_to_u16string.cpp - test_to_u32string.cpp - test_to_u8string.cpp - test_to_wstring.cpp - test_tuple.cpp - test_type_def.cpp - test_type_list.cpp - test_type_lookup.cpp - test_type_select.cpp - test_type_traits.cpp - test_unaligned_type.cpp - test_unaligned_type_ext.cpp - test_uncopyable.cpp - test_unordered_map.cpp - test_unordered_multimap.cpp - test_unordered_multiset.cpp - test_unordered_set.cpp - test_user_type.cpp - test_utility.cpp - test_variance.cpp - test_variant_legacy.cpp - test_variant_pool.cpp - test_variant_pool_external_buffer.cpp - test_variant_variadic.cpp - test_vector.cpp - test_vector_external_buffer.cpp - test_vector_non_trivial.cpp - test_vector_pointer.cpp - test_vector_pointer_external_buffer.cpp - test_visitor.cpp - test_xor_checksum.cpp - test_xor_rotate_checksum.cpp ) target_compile_definitions(etl_tests PRIVATE -DETL_DEBUG) diff --git a/test/test_string_char.cpp b/test/test_string_char.cpp index 52888c97..7ee55e32 100644 --- a/test/test_string_char.cpp +++ b/test/test_string_char.cpp @@ -3617,7 +3617,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3647,7 +3647,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3678,9 +3678,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3707,9 +3707,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3862,7 +3862,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3889,7 +3889,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3917,12 +3917,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3943,12 +3943,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3968,7 +3968,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); diff --git a/test/test_string_char_external_buffer.cpp b/test/test_string_char_external_buffer.cpp index a9145b9c..7346042b 100644 --- a/test/test_string_char_external_buffer.cpp +++ b/test/test_string_char_external_buffer.cpp @@ -2526,6 +2526,7 @@ namespace compare_text.replace(compare_text.begin() + 2, compare_text.begin() + 4, TextSTD(STR("Replace"))); compare_text.resize(std::min(compare_text.size(), SIZE)); + text.replace(text.begin() + 2, text.begin() + 4, View(STR("Replace"))); bool is_equal = Equal(compare_text, text); @@ -3820,7 +3821,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -3854,7 +3855,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -3885,9 +3886,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -3916,9 +3917,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -4034,7 +4035,7 @@ namespace TEST_FIXTURE(SetupFixture, test_starts_with_char) { TextBufferL buffer1{0}; - Text haystack(STR("A haystack with a needle and nothing else"), buffer1.data(), buffer1.size()); + Text haystack(STR("A haystack with a needle and nothing else"), buffer1.data(), buffer1.size()); CHECK_TRUE(haystack.starts_with(haystack[0])); CHECK_FALSE(haystack.starts_with(haystack[1])); @@ -4092,7 +4093,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -4124,7 +4125,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -4151,14 +4152,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = TextL::npos; @@ -4180,14 +4181,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; @@ -4208,7 +4209,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); diff --git a/test/test_string_u16.cpp b/test/test_string_u16.cpp index 754df534..9e683ac6 100644 --- a/test/test_string_u16.cpp +++ b/test/test_string_u16.cpp @@ -3631,7 +3631,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3661,7 +3661,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3692,9 +3692,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3721,9 +3721,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3876,7 +3876,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3903,7 +3903,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3931,12 +3931,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3957,12 +3957,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3982,7 +3982,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); diff --git a/test/test_string_u16_external_buffer.cpp b/test/test_string_u16_external_buffer.cpp index b445d19c..436b8651 100644 --- a/test/test_string_u16_external_buffer.cpp +++ b/test/test_string_u16_external_buffer.cpp @@ -3834,7 +3834,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -3868,7 +3868,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -3899,9 +3899,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -3930,9 +3930,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -4106,7 +4106,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -4138,7 +4138,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -4165,14 +4165,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = TextL::npos; @@ -4194,14 +4194,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; @@ -4222,7 +4222,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); diff --git a/test/test_string_u32.cpp b/test/test_string_u32.cpp index e4ab4c9e..97c01ab2 100644 --- a/test/test_string_u32.cpp +++ b/test/test_string_u32.cpp @@ -3631,7 +3631,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3661,7 +3661,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3692,9 +3692,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3721,9 +3721,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3876,7 +3876,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3903,7 +3903,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3931,12 +3931,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3957,12 +3957,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3982,7 +3982,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); diff --git a/test/test_string_u32_external_buffer.cpp b/test/test_string_u32_external_buffer.cpp index 12753051..56e82b54 100644 --- a/test/test_string_u32_external_buffer.cpp +++ b/test/test_string_u32_external_buffer.cpp @@ -3834,7 +3834,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -3868,7 +3868,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -3899,9 +3899,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -3930,9 +3930,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -4106,7 +4106,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -4138,7 +4138,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -4165,14 +4165,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = TextL::npos; @@ -4194,14 +4194,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; @@ -4222,7 +4222,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); diff --git a/test/test_string_u8.cpp b/test/test_string_u8.cpp index 147ad489..b01a67f2 100644 --- a/test/test_string_u8.cpp +++ b/test/test_string_u8.cpp @@ -3634,7 +3634,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3664,7 +3664,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3695,9 +3695,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3724,9 +3724,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3879,7 +3879,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3906,7 +3906,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3934,12 +3934,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3960,12 +3960,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3985,7 +3985,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); diff --git a/test/test_string_u8_external_buffer.cpp b/test/test_string_u8_external_buffer.cpp index b946ebdb..fe79d570 100644 --- a/test/test_string_u8_external_buffer.cpp +++ b/test/test_string_u8_external_buffer.cpp @@ -67,7 +67,7 @@ namespace // return os; //} - SUITE(test_string_char16_t_external_buffer) + SUITE(test_string_char8_t_external_buffer) { static constexpr size_t SIZE = 11; static constexpr size_t SIZE_L = 52; @@ -3837,7 +3837,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -3871,7 +3871,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -3902,9 +3902,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -3933,9 +3933,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -4102,14 +4102,17 @@ namespace TextBufferL buffer1{0}; Text haystack(STR("A haystack with a needle and nothing else"), buffer1.data(), buffer1.size()); - CHECK_TRUE(haystack.ends_with(haystack[haystack.size() - 1])); - CHECK_FALSE(haystack.ends_with(haystack[haystack.size() - 2])); + const value_t last = haystack.back(); + const value_t not_last = haystack.front(); + + CHECK_TRUE(haystack.ends_with(last)); + CHECK_FALSE(haystack.ends_with(not_last)); } //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -4141,7 +4144,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -4168,14 +4171,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = TextL::npos; @@ -4197,14 +4200,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; @@ -4225,7 +4228,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); diff --git a/test/test_string_wchar_t.cpp b/test/test_string_wchar_t.cpp index 4f368e01..9a572988 100644 --- a/test/test_string_wchar_t.cpp +++ b/test/test_string_wchar_t.cpp @@ -3632,7 +3632,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3662,7 +3662,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3693,9 +3693,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3722,9 +3722,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); @@ -3877,7 +3877,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3904,7 +3904,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); Text needle(STR("needle")); @@ -3932,12 +3932,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3958,12 +3958,12 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = Text::npos; @@ -3983,7 +3983,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextL haystack(the_haystack); diff --git a/test/test_string_wchar_t_external_buffer.cpp b/test/test_string_wchar_t_external_buffer.cpp index cf9dca8a..ad7efb12 100644 --- a/test/test_string_wchar_t_external_buffer.cpp +++ b/test/test_string_wchar_t_external_buffer.cpp @@ -3837,7 +3837,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -3871,7 +3871,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -3902,9 +3902,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_pointer) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -3933,9 +3933,9 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_find_char_pointer_n) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); TextSTD compare_haystack(the_haystack); @@ -4109,7 +4109,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_string) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); @@ -4141,7 +4141,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_view) { - const value_t* the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_needle(STR("needle")); View needle_view(STR("needle")); @@ -4168,14 +4168,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; size_t position2 = TextL::npos; @@ -4197,14 +4197,14 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_pointer_n) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); TextBufferL buffer{0}; Text haystack(the_haystack, buffer.data(), buffer.size()); - const value_t* needle = STR("needle"); + const value_t needle[] = STR("needle"); size_t position1 = TextSTD::npos; @@ -4225,7 +4225,7 @@ namespace //************************************************************************* TEST_FIXTURE(SetupFixture, test_rfind_c_position) { - const value_t*the_haystack = STR("A haystack with a needle and another needle"); + const value_t the_haystack[] = STR("A haystack with a needle and another needle"); TextSTD compare_haystack(the_haystack); diff --git a/test/vs2022/etl.sln b/test/vs2022/etl.sln index 96122d58..31d5ac32 100644 --- a/test/vs2022/etl.sln +++ b/test/vs2022/etl.sln @@ -7,6 +7,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "etl", "etl.vcxproj", "{C21D EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug Clang C++20 - Optimised -O2|Win32 = Debug Clang C++20 - Optimised -O2|Win32 + Debug Clang C++20 - Optimised -O2|x64 = Debug Clang C++20 - Optimised -O2|x64 + Debug Clang C++20|Win32 = Debug Clang C++20|Win32 + Debug Clang C++20|x64 = Debug Clang C++20|x64 Debug MSVC C++ 20 - No Tests|Win32 = Debug MSVC C++ 20 - No Tests|Win32 Debug MSVC C++ 20 - No Tests|x64 = Debug MSVC C++ 20 - No Tests|x64 Debug MSVC C++14 - No STL|Win32 = Debug MSVC C++14 - No STL|Win32 @@ -39,6 +43,14 @@ Global Release MSVC C++20 - Optimised O2|x64 = Release MSVC C++20 - Optimised O2|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Clang C++20 - Optimised -O2|Win32.ActiveCfg = Debug Clang C++20 - Optimised -O2|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Clang C++20 - Optimised -O2|Win32.Build.0 = Debug Clang C++20 - Optimised -O2|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Clang C++20 - Optimised -O2|x64.ActiveCfg = Debug Clang C++20 - Optimised -O2|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Clang C++20 - Optimised -O2|x64.Build.0 = Debug Clang C++20 - Optimised -O2|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Clang C++20|Win32.ActiveCfg = Debug Clang C++20|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Clang C++20|Win32.Build.0 = Debug Clang C++20|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Clang C++20|x64.ActiveCfg = Debug Clang C++20|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug Clang C++20|x64.Build.0 = Debug Clang C++20|x64 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++ 20 - No Tests|Win32.ActiveCfg = Debug MSVC C++ 20 - No Tests|Win32 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++ 20 - No Tests|Win32.Build.0 = Debug MSVC C++ 20 - No Tests|Win32 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC C++ 20 - No Tests|x64.ActiveCfg = Debug MSVC C++ 20 - No Tests|x64 diff --git a/test/vs2022/etl.vcxproj b/test/vs2022/etl.vcxproj index bd18afdf..6f92be54 100644 --- a/test/vs2022/etl.vcxproj +++ b/test/vs2022/etl.vcxproj @@ -1,6 +1,22 @@  + + Debug Clang C++20 - Optimised -O2 + Win32 + + + Debug Clang C++20 - Optimised -O2 + x64 + + + Debug Clang C++20 + Win32 + + + Debug Clang C++20 + x64 + Debug MSVC C++ 20 - No Tests Win32 @@ -159,6 +175,20 @@ Unicode false + + Application + true + ClangCL + Unicode + false + + + Application + true + ClangCL + Unicode + false + Application true @@ -420,6 +450,18 @@ v143 Unicode + + Application + true + v143 + Unicode + + + Application + true + v143 + Unicode + Application true @@ -692,6 +734,12 @@ + + + + + + @@ -809,6 +857,12 @@ + + + + + + @@ -951,6 +1005,16 @@ true $(Configuration)\ + + true + true + $(Configuration)\ + + + true + true + $(Configuration)\ + true true @@ -1149,6 +1213,14 @@ true true + + true + true + + + true + true + true true @@ -1397,6 +1469,58 @@ "$(OutDir)\etl.exe" + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ../../../unittest-cpp/;../../include;../../test + + + true + stdcpp20 + EditAndContinue + /Zc:__cplusplus %(AdditionalOptions) + true + EnableFastChecks + false + + + Console + true + + + "$(OutDir)\etl.exe" + + + + + + + Level3 + MaxSpeed + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ../../../unittest-cpp/;../../include;../../test + + + true + stdcpp20 + EditAndContinue + /Zc:__cplusplus %(AdditionalOptions) + true + EnableFastChecks + false + + + Console + true + + + "$(OutDir)\etl.exe" + + @@ -2370,6 +2494,48 @@ $(OutDir)\etl.exe + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test + + + false + stdcpp14 + + + Console + true + + + $(OutDir)\etl.exe + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test + + + false + stdcpp14 + + + Console + true + + + $(OutDir)\etl.exe + + @@ -3650,6 +3816,8 @@ true + true + true true true true @@ -3670,6 +3838,8 @@ true true true + true + true true true true @@ -3711,6 +3881,8 @@ true true true + true + true true true true @@ -3752,6 +3924,8 @@ true true true + true + true true true true @@ -3793,6 +3967,8 @@ true true true + true + true true true true @@ -3871,6 +4047,8 @@ true + true + true true true true @@ -3889,6 +4067,8 @@ true + true + true true true true @@ -3909,6 +4089,8 @@ true true true + true + true true true true @@ -3950,6 +4132,8 @@ true true true + true + true true true true @@ -3991,6 +4175,8 @@ true true true + true + true true true true @@ -4032,6 +4218,8 @@ true true true + true + true true true true @@ -4073,6 +4261,8 @@ true + true + true true true true @@ -4091,6 +4281,8 @@ true + true + true true true true @@ -4109,6 +4301,8 @@ true + true + true true true true @@ -4127,6 +4321,8 @@ true + true + true true true true @@ -4145,6 +4341,8 @@ true + true + true true true true @@ -4163,6 +4361,8 @@ true + true + true true true true @@ -4181,6 +4381,8 @@ true + true + true true true true @@ -4199,6 +4401,8 @@ true + true + true true true true @@ -4217,6 +4421,8 @@ true + true + true true true true @@ -4233,6 +4439,8 @@ true true true + true + true true true true @@ -4251,6 +4459,8 @@ true + true + true true true true @@ -4267,6 +4477,8 @@ true true true + true + true true true true @@ -4285,6 +4497,8 @@ true + true + true true true true @@ -4303,6 +4517,8 @@ true + true + true true true true @@ -4321,6 +4537,8 @@ true + true + true true true true @@ -4339,6 +4557,8 @@ true + true + true true true true @@ -4357,6 +4577,8 @@ true + true + true true true true @@ -4375,6 +4597,8 @@ true + true + true true true true @@ -4393,6 +4617,8 @@ true + true + true true true true @@ -4409,6 +4635,8 @@ true true true + true + true true true true @@ -4427,6 +4655,8 @@ true + true + true true true true @@ -4445,6 +4675,8 @@ true + true + true true true true @@ -4463,6 +4695,8 @@ true + true + true true true true @@ -4481,6 +4715,8 @@ true + true + true true true true @@ -4499,6 +4735,8 @@ true + true + true true true true @@ -4517,6 +4755,8 @@ true + true + true true true true @@ -4535,6 +4775,8 @@ true + true + true true true true @@ -4553,6 +4795,8 @@ true + true + true true true true @@ -4571,6 +4815,8 @@ true + true + true true true true @@ -4589,6 +4835,8 @@ true + true + true true true true @@ -4607,6 +4855,8 @@ true + true + true true true true @@ -4625,6 +4875,8 @@ true + true + true true true true @@ -4643,6 +4895,8 @@ true + true + true true true true @@ -4661,6 +4915,8 @@ true + true + true true true true @@ -4679,6 +4935,8 @@ true + true + true true true true @@ -4697,6 +4955,8 @@ true + true + true true true true @@ -4715,6 +4975,8 @@ true + true + true true true true @@ -4733,6 +4995,8 @@ true + true + true true true true @@ -4751,6 +5015,8 @@ true + true + true true true true @@ -4769,6 +5035,8 @@ true + true + true true true true @@ -4787,6 +5055,8 @@ true + true + true true true true @@ -4805,6 +5075,8 @@ true + true + true true true true @@ -4823,6 +5095,8 @@ true + true + true true true true @@ -4841,6 +5115,8 @@ true + true + true true true true @@ -4859,6 +5135,8 @@ true + true + true true true true @@ -4877,6 +5155,8 @@ true + true + true true true true @@ -4895,6 +5175,8 @@ true + true + true true true true @@ -4913,6 +5195,8 @@ true + true + true true true true @@ -4929,6 +5213,8 @@ true true true + true + true true true true @@ -4947,6 +5233,8 @@ true + true + true true true true @@ -4965,6 +5253,8 @@ true + true + true true true true @@ -4983,6 +5273,8 @@ true + true + true true true true @@ -5001,6 +5293,8 @@ true + true + true true true true @@ -5019,6 +5313,8 @@ true + true + true true true true @@ -5037,6 +5333,8 @@ true + true + true true true true @@ -5055,6 +5353,8 @@ true + true + true true true true @@ -5073,6 +5373,8 @@ true + true + true true true true @@ -5091,6 +5393,8 @@ true + true + true true true true @@ -5109,6 +5413,8 @@ true + true + true true true true @@ -5127,6 +5433,8 @@ true + true + true true true true @@ -5145,6 +5453,8 @@ true + true + true true true true @@ -5163,6 +5473,8 @@ true + true + true true true true @@ -5181,6 +5493,8 @@ true + true + true true true true @@ -5199,6 +5513,8 @@ true + true + true true true true @@ -5217,6 +5533,8 @@ true + true + true true true true @@ -5235,6 +5553,8 @@ true + true + true true true true @@ -5253,6 +5573,8 @@ true + true + true true true true @@ -5271,6 +5593,8 @@ true + true + true true true true @@ -5289,6 +5613,8 @@ true + true + true true true true @@ -5307,6 +5633,8 @@ true + true + true true true true @@ -5325,6 +5653,8 @@ true + true + true true true true @@ -5343,6 +5673,8 @@ true + true + true true true true @@ -5361,6 +5693,8 @@ true + true + true true true true @@ -5379,6 +5713,8 @@ true + true + true true true true @@ -5397,6 +5733,8 @@ true + true + true true true true @@ -5415,6 +5753,8 @@ true + true + true true true true @@ -5433,6 +5773,8 @@ true + true + true true true true @@ -5451,6 +5793,8 @@ true + true + true true true true @@ -5469,6 +5813,8 @@ true + true + true true true true @@ -5487,6 +5833,8 @@ true + true + true true true true @@ -5505,6 +5853,8 @@ true + true + true true true true @@ -5523,6 +5873,8 @@ true + true + true true true true @@ -5541,6 +5893,8 @@ true + true + true true true true @@ -5559,6 +5913,8 @@ true + true + true true true true @@ -5577,6 +5933,8 @@ true + true + true true true true @@ -5595,6 +5953,8 @@ true + true + true true true true @@ -5613,6 +5973,8 @@ true + true + true true true true @@ -5631,6 +5993,8 @@ true + true + true true true true @@ -5649,6 +6013,8 @@ true + true + true true true true @@ -5667,6 +6033,8 @@ true + true + true true true true @@ -5685,6 +6053,8 @@ true + true + true true true true @@ -5703,6 +6073,8 @@ true + true + true true true true @@ -5721,6 +6093,8 @@ true + true + true true true true @@ -5739,6 +6113,8 @@ true + true + true true true true @@ -5757,6 +6133,8 @@ true + true + true true true true @@ -5775,6 +6153,8 @@ true + true + true true true true @@ -5793,6 +6173,8 @@ true + true + true true true true @@ -5811,6 +6193,8 @@ true + true + true true true true @@ -5829,6 +6213,8 @@ true + true + true true true true @@ -5847,6 +6233,8 @@ true + true + true true true true @@ -5865,6 +6253,8 @@ true + true + true true true true @@ -5883,6 +6273,8 @@ true + true + true true true true @@ -5901,6 +6293,8 @@ true + true + true true true true @@ -5919,6 +6313,8 @@ true + true + true true true true @@ -5937,6 +6333,8 @@ true + true + true true true true @@ -5955,6 +6353,8 @@ true + true + true true true true @@ -5973,6 +6373,8 @@ true + true + true true true true @@ -5991,6 +6393,8 @@ true + true + true true true true @@ -6009,6 +6413,8 @@ true + true + true true true true @@ -6027,6 +6433,8 @@ true + true + true true true true @@ -6045,6 +6453,8 @@ true + true + true true true true @@ -6063,6 +6473,8 @@ true + true + true true true true @@ -6081,6 +6493,8 @@ true + true + true true true true @@ -6099,6 +6513,8 @@ true + true + true true true true @@ -6117,6 +6533,8 @@ true + true + true true true true @@ -6135,6 +6553,8 @@ true + true + true true true true @@ -6153,6 +6573,8 @@ true + true + true true true true @@ -6171,6 +6593,8 @@ true + true + true true true true @@ -6189,6 +6613,8 @@ true + true + true true true true @@ -6207,6 +6633,8 @@ true + true + true true true true @@ -6225,6 +6653,8 @@ true + true + true true true true @@ -6243,6 +6673,8 @@ true + true + true true true true @@ -6261,6 +6693,8 @@ true + true + true true true true @@ -6279,6 +6713,8 @@ true + true + true true true true @@ -6297,6 +6733,8 @@ true + true + true true true true @@ -6315,6 +6753,8 @@ true + true + true true true true @@ -6333,6 +6773,8 @@ true + true + true true true true @@ -6351,6 +6793,8 @@ true + true + true true true true @@ -6369,6 +6813,8 @@ true + true + true true true true @@ -6387,6 +6833,8 @@ true + true + true true true true @@ -6405,6 +6853,8 @@ true + true + true true true true @@ -6423,6 +6873,8 @@ true + true + true true true true @@ -6441,6 +6893,8 @@ true + true + true true true true @@ -6459,6 +6913,8 @@ true + true + true true true true @@ -6477,6 +6933,8 @@ true + true + true true true true @@ -6495,6 +6953,8 @@ true + true + true true true true @@ -6511,6 +6971,8 @@ true true true + true + true true true true @@ -6529,6 +6991,8 @@ true + true + true true true true @@ -6547,6 +7011,8 @@ true + true + true true true true @@ -6565,6 +7031,8 @@ true + true + true true true true @@ -6583,6 +7051,8 @@ true + true + true true true true @@ -6601,6 +7071,8 @@ true + true + true true true true @@ -6619,6 +7091,8 @@ true + true + true true true true @@ -6637,6 +7111,8 @@ true + true + true true true true @@ -6655,6 +7131,8 @@ true + true + true true true true @@ -6673,6 +7151,8 @@ true + true + true true true true @@ -6691,6 +7171,8 @@ true + true + true true true true @@ -6709,6 +7191,8 @@ true + true + true true true true @@ -6727,6 +7211,8 @@ true + true + true true true true @@ -6745,6 +7231,8 @@ true + true + true true true true @@ -6763,6 +7251,8 @@ true + true + true true true true @@ -6781,6 +7271,8 @@ true + true + true true true true @@ -6799,6 +7291,8 @@ true + true + true true true true @@ -6817,6 +7311,8 @@ true + true + true true true true @@ -6835,6 +7331,8 @@ true + true + true true true true @@ -6853,6 +7351,8 @@ true + true + true true true true @@ -6871,6 +7371,8 @@ true + true + true true true true @@ -6889,6 +7391,8 @@ true + true + true true true true @@ -6907,6 +7411,8 @@ true + true + true true true true @@ -6925,6 +7431,8 @@ true + true + true true true true @@ -6943,6 +7451,8 @@ true + true + true true true true @@ -6961,6 +7471,8 @@ true + true + true true true true @@ -6979,6 +7491,8 @@ true + true + true true true true @@ -6997,6 +7511,8 @@ true + true + true true true true @@ -7015,6 +7531,8 @@ true + true + true true true true @@ -7033,6 +7551,8 @@ true + true + true true true true @@ -7051,6 +7571,8 @@ true + true + true true true true @@ -7069,6 +7591,8 @@ true + true + true true true true @@ -7087,6 +7611,8 @@ true + true + true true true true @@ -7105,6 +7631,8 @@ true + true + true true true true @@ -7123,6 +7651,8 @@ true + true + true true true true @@ -7141,6 +7671,8 @@ true + true + true true true true @@ -7159,6 +7691,8 @@ true + true + true true true true @@ -7177,6 +7711,8 @@ true + true + true true true true @@ -7195,6 +7731,8 @@ true + true + true true true true @@ -7213,6 +7751,8 @@ true + true + true true true true @@ -7231,6 +7771,8 @@ true + true + true true true true @@ -7249,6 +7791,8 @@ true + true + true true true true @@ -7267,6 +7811,8 @@ true + true + true true true true @@ -7285,6 +7831,8 @@ true + true + true true true true @@ -7303,6 +7851,8 @@ true + true + true true true true @@ -7321,6 +7871,8 @@ true + true + true true true true @@ -7339,6 +7891,8 @@ true + true + true true true true @@ -7357,6 +7911,8 @@ true + true + true true true true @@ -7375,6 +7931,8 @@ true + true + true true true true @@ -7393,6 +7951,8 @@ true + true + true true true true @@ -7411,6 +7971,8 @@ true + true + true true true true @@ -7429,6 +7991,8 @@ true + true + true true true true @@ -7447,6 +8011,8 @@ true + true + true true true true @@ -7465,6 +8031,8 @@ true + true + true true true true @@ -7483,6 +8051,8 @@ true + true + true true true true @@ -7501,6 +8071,8 @@ true + true + true true true true @@ -7519,6 +8091,8 @@ true + true + true true true true @@ -7537,6 +8111,8 @@ true + true + true true true true @@ -7555,6 +8131,8 @@ true + true + true true true true @@ -7573,6 +8151,8 @@ true + true + true true true true @@ -7591,6 +8171,8 @@ true + true + true true true true @@ -7609,6 +8191,8 @@ true + true + true true true true @@ -7627,6 +8211,8 @@ true + true + true true true true @@ -7645,6 +8231,8 @@ true + true + true true true true @@ -7663,6 +8251,8 @@ true + true + true true true true @@ -7681,6 +8271,8 @@ true + true + true true true true @@ -7699,6 +8291,8 @@ true + true + true true true true @@ -7717,6 +8311,8 @@ true + true + true true true true @@ -7735,6 +8331,8 @@ true + true + true true true true @@ -7753,6 +8351,8 @@ true + true + true true true true @@ -7771,6 +8371,8 @@ true + true + true true true true @@ -7789,6 +8391,8 @@ true + true + true true true true @@ -7807,6 +8411,8 @@ true + true + true true true true @@ -7825,6 +8431,8 @@ true + true + true true true true @@ -7843,6 +8451,8 @@ true + true + true true true true @@ -7861,6 +8471,8 @@ true + true + true true true true @@ -7879,6 +8491,8 @@ true + true + true true true true @@ -7897,6 +8511,8 @@ true + true + true true true true @@ -7915,6 +8531,8 @@ true + true + true true true true @@ -7933,6 +8551,8 @@ true + true + true true true true @@ -7951,6 +8571,8 @@ true + true + true true true true @@ -7969,6 +8591,8 @@ true + true + true true true true @@ -7987,6 +8611,8 @@ true + true + true true true true @@ -8005,6 +8631,8 @@ true + true + true true true true @@ -8023,6 +8651,8 @@ true + true + true true true true @@ -8041,6 +8671,8 @@ true + true + true true true true @@ -8059,6 +8691,8 @@ true + true + true true true true @@ -8077,6 +8711,8 @@ true + true + true true true true @@ -8095,6 +8731,8 @@ true + true + true true true true @@ -8113,6 +8751,8 @@ true + true + true true true true @@ -8131,6 +8771,8 @@ true + true + true true true true @@ -8149,6 +8791,8 @@ true + true + true true true true @@ -8165,6 +8809,8 @@ true true true + true + true true true true @@ -8183,6 +8829,8 @@ true + true + true true true true @@ -8201,6 +8849,8 @@ true + true + true true true true @@ -8219,6 +8869,8 @@ true + true + true true true true @@ -8237,6 +8889,8 @@ true + true + true true true true @@ -8255,6 +8909,8 @@ true + true + true true true true @@ -8273,6 +8929,8 @@ true + true + true true true true @@ -8291,6 +8949,8 @@ true + true + true true true true @@ -8309,6 +8969,8 @@ true + true + true true true true @@ -8327,6 +8989,8 @@ true + true + true true true true @@ -8345,6 +9009,8 @@ true + true + true true true true @@ -8363,6 +9029,8 @@ true + true + true true true true @@ -8381,6 +9049,8 @@ true + true + true true true true @@ -8399,6 +9069,8 @@ true + true + true true true true @@ -8417,6 +9089,8 @@ true + true + true true true true @@ -8435,6 +9109,8 @@ true + true + true true true true @@ -8453,6 +9129,8 @@ true + true + true true true true @@ -8469,6 +9147,8 @@ true true true + true + true true true true @@ -8487,6 +9167,8 @@ true + true + true true true true @@ -8505,6 +9187,8 @@ true + true + true true true true @@ -8523,6 +9207,8 @@ true + true + true true true true @@ -8541,6 +9227,8 @@ true + true + true true true true @@ -8559,6 +9247,8 @@ true + true + true true true true @@ -8577,6 +9267,8 @@ true + true + true true true true @@ -8595,6 +9287,8 @@ true + true + true true true true @@ -8613,6 +9307,8 @@ true + true + true true true true @@ -8631,6 +9327,8 @@ true + true + true true true true @@ -8649,6 +9347,8 @@ true + true + true true true true @@ -8667,6 +9367,8 @@ true + true + true true true true @@ -8685,6 +9387,8 @@ true + true + true true true true @@ -8703,6 +9407,8 @@ true + true + true true true true @@ -8721,6 +9427,8 @@ true + true + true true true true @@ -8739,6 +9447,8 @@ true + true + true true true true @@ -8757,6 +9467,8 @@ true + true + true true true true @@ -8775,6 +9487,8 @@ true + true + true true true true @@ -8793,6 +9507,8 @@ true + true + true true true true @@ -8811,6 +9527,8 @@ true + true + true true true true @@ -8829,6 +9547,8 @@ true + true + true true true true @@ -8847,6 +9567,8 @@ true + true + true true true true @@ -8865,6 +9587,8 @@ true + true + true true true true @@ -8883,6 +9607,8 @@ true + true + true true true true @@ -8901,6 +9627,8 @@ true + true + true true true true @@ -8919,6 +9647,8 @@ true + true + true true true true @@ -8937,6 +9667,8 @@ true + true + true true true true @@ -8955,6 +9687,8 @@ true + true + true true true true @@ -8973,6 +9707,8 @@ true + true + true true true true @@ -8991,6 +9727,8 @@ true + true + true true true true @@ -9009,6 +9747,8 @@ true + true + true true true true @@ -9027,6 +9767,8 @@ true + true + true true true true @@ -9045,6 +9787,8 @@ true + true + true true true true @@ -9063,6 +9807,8 @@ true + true + true true true true @@ -9081,6 +9827,8 @@ true + true + true true true true @@ -9099,6 +9847,8 @@ true + true + true true true true @@ -9117,6 +9867,8 @@ true + true + true true true true @@ -9135,6 +9887,8 @@ true + true + true true true true @@ -9153,6 +9907,8 @@ true + true + true true true true @@ -9171,6 +9927,8 @@ true + true + true true true true @@ -9189,6 +9947,8 @@ true + true + true true true true @@ -9207,6 +9967,8 @@ true + true + true true true true @@ -9225,6 +9987,8 @@ true + true + true true true true @@ -9243,6 +10007,8 @@ true + true + true true true true @@ -9261,6 +10027,8 @@ true + true + true true true true @@ -9279,6 +10047,8 @@ true + true + true true true true @@ -9297,6 +10067,8 @@ true + true + true true true true @@ -9315,6 +10087,8 @@ true + true + true true true true @@ -9340,6 +10114,8 @@ false + false + false false false false @@ -9556,6 +10332,8 @@ false false false + false + false false false false @@ -9599,6 +10377,8 @@ false false false + false + false false false false @@ -9661,6 +10441,8 @@ false false false + false + false false false false @@ -9704,6 +10486,8 @@ false false false + false + false false false false @@ -9761,6 +10545,8 @@ false false false + false + false false false false @@ -9804,6 +10590,8 @@ false false false + false + false false false false @@ -9851,6 +10639,8 @@ false false false + false + false false false false @@ -9894,6 +10684,8 @@ false false false + false + false false false false @@ -9941,6 +10733,8 @@ false false false + false + false false false false @@ -9984,6 +10778,8 @@ false false false + false + false false false false @@ -10031,6 +10827,8 @@ false false false + false + false false false false @@ -10074,6 +10872,8 @@ false false false + false + false false false false @@ -10126,6 +10926,8 @@ false false false + false + false false false false @@ -10169,6 +10971,8 @@ false false false + false + false false false false @@ -10220,6 +11024,8 @@ false false false + false + false false false false @@ -10263,6 +11069,8 @@ false false false + false + false false false false @@ -10322,6 +11130,8 @@ false false false + false + false false false false @@ -10365,6 +11175,8 @@ false false false + false + false false false false @@ -10619,6 +11431,8 @@ true + true + true true true true @@ -10639,6 +11453,8 @@ true true true + true + true true true true @@ -10680,6 +11496,8 @@ true true true + true + true true true true @@ -10721,6 +11539,8 @@ true true true + true + true true true true @@ -10762,6 +11582,8 @@ true true true + true + true true true true @@ -10802,6 +11624,8 @@ true + true + true true true true diff --git a/version.txt b/version.txt index 36452a4c..411c7d3b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -20.43.0 +20.43.1