fix unit-tests

This commit is contained in:
akildemir
2025-03-31 10:49:39 +03:00
parent 0418bfee30
commit 0f97ec9ea7
35 changed files with 639 additions and 535 deletions

View File

@@ -167,11 +167,11 @@ TEST(validate_parse_amount_case, validate_parse_amount)
uint64_t res = 0;
bool r = cryptonote::parse_amount(res, "0.0001");
ASSERT_TRUE(r);
ASSERT_EQ(res, 100000000);
ASSERT_EQ(res, 10000);
r = cryptonote::parse_amount(res, "100.0001");
ASSERT_TRUE(r);
ASSERT_EQ(res, 100000100000000);
ASSERT_EQ(res, 10000010000);
r = cryptonote::parse_amount(res, "000.0000");
ASSERT_TRUE(r);
@@ -184,11 +184,11 @@ TEST(validate_parse_amount_case, validate_parse_amount)
r = cryptonote::parse_amount(res, " 100.0001 ");
ASSERT_TRUE(r);
ASSERT_EQ(res, 100000100000000);
ASSERT_EQ(res, 10000010000);
r = cryptonote::parse_amount(res, " 100.0000 ");
ASSERT_TRUE(r);
ASSERT_EQ(res, 100000000000000);
ASSERT_EQ(res, 10000000000);
r = cryptonote::parse_amount(res, " 100. 0000 ");
ASSERT_FALSE(r);