diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-03-27 10:06:14 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-03-27 10:14:08 -0400 |
commit | faaf1cb5b9a4c22b21757f7578833f908b79b867 (patch) | |
tree | d6deeed0ba30dee8b583282e5ab66ac7219d336d /src/test | |
parent | fac96fff624a3ab65209dcd3378efb6e6ab47a58 (diff) |
util: Replace i64tostr with ToString
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/integer.cpp | 3 | ||||
-rw-r--r-- | src/test/fuzz/locale.cpp | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/test/fuzz/integer.cpp b/src/test/fuzz/integer.cpp index 3ed99cd43f..bd2e20030d 100644 --- a/src/test/fuzz/integer.cpp +++ b/src/test/fuzz/integer.cpp @@ -27,6 +27,7 @@ #include <uint256.h> #include <util/moneystr.h> #include <util/strencodings.h> +#include <util/string.h> #include <util/system.h> #include <util/time.h> #include <version.h> @@ -93,7 +94,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) // (void)GetVirtualTransactionSize(i64, i64, u32); // function defined only for a subset of int64_t/uint32_t inputs (void)HexDigit(ch); (void)MoneyRange(i64); - (void)i64tostr(i64); + (void)ToString(i64); (void)IsDigit(ch); (void)IsSpace(ch); (void)IsSwitchChar(ch); diff --git a/src/test/fuzz/locale.cpp b/src/test/fuzz/locale.cpp index cdad2d6fbd..09580c0c52 100644 --- a/src/test/fuzz/locale.cpp +++ b/src/test/fuzz/locale.cpp @@ -6,6 +6,7 @@ #include <test/fuzz/fuzz.h> #include <tinyformat.h> #include <util/strencodings.h> +#include <util/string.h> #include <cassert> #include <clocale> @@ -54,7 +55,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) const int atoi_without_locale = atoi(random_string); const int64_t atoi64c_without_locale = atoi64(random_string.c_str()); const int64_t random_int64 = fuzzed_data_provider.ConsumeIntegral<int64_t>(); - const std::string i64tostr_without_locale = i64tostr(random_int64); + const std::string tostring_without_locale = ToString(random_int64); const int32_t random_int32 = fuzzed_data_provider.ConsumeIntegral<int32_t>(); const std::string strprintf_int_without_locale = strprintf("%d", random_int64); const double random_double = fuzzed_data_provider.ConsumeFloatingPoint<double>(); @@ -81,8 +82,8 @@ void test_one_input(const std::vector<uint8_t>& buffer) assert(atoi64c_without_locale == atoi64c_with_locale); const int atoi_with_locale = atoi(random_string); assert(atoi_without_locale == atoi_with_locale); - const std::string i64tostr_with_locale = i64tostr(random_int64); - assert(i64tostr_without_locale == i64tostr_with_locale); + const std::string tostring_with_locale = ToString(random_int64); + assert(tostring_without_locale == tostring_with_locale); const std::string strprintf_int_with_locale = strprintf("%d", random_int64); assert(strprintf_int_without_locale == strprintf_int_with_locale); const std::string strprintf_double_with_locale = strprintf("%f", random_double); |