Skip to content

Commit

Permalink
Resolve 0U ambiguity in string utility tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jwellbelove committed Aug 2, 2020
1 parent bd392b4 commit bd578b6
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Expand Up @@ -6,6 +6,7 @@ jobs:
branches:
only:
- master
- development
steps:
- checkout:
- run:
Expand Down
2 changes: 1 addition & 1 deletion include/etl/string_utilities.h
Expand Up @@ -745,7 +745,7 @@ namespace etl
if (required_size > s.size())
{
required_size -= s.size();
s.insert(0U, required_size, pad_char);
s.insert(size_t(0U), required_size, pad_char);
}
}

Expand Down
2 changes: 1 addition & 1 deletion include/etl/version.h
Expand Up @@ -39,7 +39,7 @@ SOFTWARE.

#define ETL_VERSION_MAJOR 18
#define ETL_VERSION_MINOR 12
#define ETL_VERSION_PATCH 2
#define ETL_VERSION_PATCH 3
#define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH)
#define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH)
#define ETL_VERSION_U16 ETL_STRINGIFY(ETL_VERSION_MAJOR) u"." ETL_STRINGIFY(ETL_VERSION_MINOR) u"." ETL_STRINGIFY(ETL_VERSION_PATCH)
Expand Down
2 changes: 1 addition & 1 deletion library.json
@@ -1,6 +1,6 @@
{
"name": "Embedded Template Library",
"version": "18.12.2",
"version": "18.12.3",
"authors": {
"name": "John Wellbelove",
"email": "john.wellbelove@etlcpp.com"
Expand Down
2 changes: 1 addition & 1 deletion library.properties
@@ -1,5 +1,5 @@
name=Embedded Template Library
version=18.12.2
version=18.12.3
author= John Wellbelove <john.wellbelove@etlcpp.com>
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
license=MIT
Expand Down
4 changes: 4 additions & 0 deletions support/Release notes.txt
@@ -1,3 +1,7 @@
===============================================================================
18.12.3
Resolve 0U constant ambiguity in string utility tests

===============================================================================
18.12.2
Deleted unused file.
Expand Down
4 changes: 2 additions & 2 deletions test/test_string_utilities.cpp
Expand Up @@ -1086,7 +1086,7 @@ namespace
{
String text(STR("Hello World"));
String expected(text);
expected.insert(0U, text.capacity() - expected.size(), STR('x'));
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));

etl::pad_left(text, text.capacity() + 1U, STR('x'));

Expand Down Expand Up @@ -1154,7 +1154,7 @@ namespace
{
String text(STR("Hello World"));
String expected(text);
expected.insert(0U, text.capacity() - expected.size(), STR('x'));
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));

etl::pad(text, text.capacity() + 1U, etl::string_pad_direction::LEFT, STR('x'));

Expand Down
4 changes: 2 additions & 2 deletions test/test_string_utilities_u16.cpp
Expand Up @@ -1086,7 +1086,7 @@ namespace
{
String text(STR("Hello World"));
String expected(text);
expected.insert(0U, text.capacity() - expected.size(), STR('x'));
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));

etl::pad_left(text, text.capacity() + 1U, STR('x'));

Expand Down Expand Up @@ -1154,7 +1154,7 @@ namespace
{
String text(STR("Hello World"));
String expected(text);
expected.insert(0U, text.capacity() - expected.size(), STR('x'));
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));

etl::pad(text, text.capacity() + 1U, etl::string_pad_direction::LEFT, STR('x'));

Expand Down
4 changes: 2 additions & 2 deletions test/test_string_utilities_u32.cpp
Expand Up @@ -1086,7 +1086,7 @@ namespace
{
String text(STR("Hello World"));
String expected(text);
expected.insert(0U, text.capacity() - expected.size(), STR('x'));
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));

etl::pad_left(text, text.capacity() + 1U, STR('x'));

Expand Down Expand Up @@ -1154,7 +1154,7 @@ namespace
{
String text(STR("Hello World"));
String expected(text);
expected.insert(0U, text.capacity() - expected.size(), STR('x'));
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));

etl::pad(text, text.capacity() + 1U, etl::string_pad_direction::LEFT, STR('x'));

Expand Down
4 changes: 2 additions & 2 deletions test/test_string_utilities_wchar_t.cpp
Expand Up @@ -1086,7 +1086,7 @@ namespace
{
String text(STR("Hello World"));
String expected(text);
expected.insert(0U, text.capacity() - expected.size(), STR('x'));
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));

etl::pad_left(text, text.capacity() + 1U, STR('x'));

Expand Down Expand Up @@ -1154,7 +1154,7 @@ namespace
{
String text(STR("Hello World"));
String expected(text);
expected.insert(0U, text.capacity() - expected.size(), STR('x'));
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));

etl::pad(text, text.capacity() + 1U, etl::string_pad_direction::LEFT, STR('x'));

Expand Down

0 comments on commit bd578b6

Please sign in to comment.