aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-01-10 01:46:32 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2019-01-10 02:51:14 +0100
commit332b3dd7c156daa08df347dc3359f0ee99ce4baa (patch)
treebbd9ee1fdcad37089529f7728774150562e2c0e4 /src/test
parentedb5bb35000e13e001e2693fbff4e8cc9358e166 (diff)
util: Make ToLower and ToUpper take a char
Unfortunately, `std::string` elements are (bare) chars. As these are the most likely type to be passed to these functions, make them use char instead of unsigned char. This avoids some casts.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/util_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 9acebdd820..71b6ec7425 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -1224,7 +1224,7 @@ BOOST_AUTO_TEST_CASE(test_ToLower)
BOOST_CHECK_EQUAL(ToLower('Z'), 'z');
BOOST_CHECK_EQUAL(ToLower('['), '[');
BOOST_CHECK_EQUAL(ToLower(0), 0);
- BOOST_CHECK_EQUAL(ToLower(255), 255);
+ BOOST_CHECK_EQUAL(ToLower('\xff'), '\xff');
std::string testVector;
Downcase(testVector);
@@ -1246,7 +1246,7 @@ BOOST_AUTO_TEST_CASE(test_ToUpper)
BOOST_CHECK_EQUAL(ToUpper('z'), 'Z');
BOOST_CHECK_EQUAL(ToUpper('{'), '{');
BOOST_CHECK_EQUAL(ToUpper(0), 0);
- BOOST_CHECK_EQUAL(ToUpper(255), 255);
+ BOOST_CHECK_EQUAL(ToUpper('\xff'), '\xff');
}
BOOST_AUTO_TEST_CASE(test_Capitalize)