Skip to content

Commit 2222c30

Browse files
author
MarcoFalke
committed
test: Use char instead of unsigned char
1 parent faa8023 commit 2222c30

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/test/crypto_tests.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,15 @@ static void TestHKDF_SHA256_32(const std::string &ikm_hex, const std::string &sa
186186
BOOST_CHECK(HexStr(out, out + 32) == okm_check_hex);
187187
}
188188

189-
static std::string LongTestString() {
189+
static std::string LongTestString()
190+
{
190191
std::string ret;
191-
for (int i=0; i<200000; i++) {
192-
ret += (unsigned char)(i);
193-
ret += (unsigned char)(i >> 4);
194-
ret += (unsigned char)(i >> 8);
195-
ret += (unsigned char)(i >> 12);
196-
ret += (unsigned char)(i >> 16);
192+
for (int i = 0; i < 200000; i++) {
193+
ret += (char)(i);
194+
ret += (char)(i >> 4);
195+
ret += (char)(i >> 8);
196+
ret += (char)(i >> 12);
197+
ret += (char)(i >> 16);
197198
}
198199
return ret;
199200
}

0 commit comments

Comments
 (0)