fixed unit tests

This commit is contained in:
Riccardo Spagni 2014-10-08 21:38:55 +02:00
parent bc537ac095
commit 1795c381c0
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
5 changed files with 42 additions and 34 deletions

View file

@ -165,11 +165,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, 10000);
ASSERT_EQ(res, 100000000);
r = cryptonote::parse_amount(res, "100.0001");
ASSERT_TRUE(r);
ASSERT_EQ(res, 10000010000);
ASSERT_EQ(res, 100000100000000);
r = cryptonote::parse_amount(res, "000.0000");
ASSERT_TRUE(r);
@ -182,11 +182,11 @@ TEST(validate_parse_amount_case, validate_parse_amount)
r = cryptonote::parse_amount(res, " 100.0001 ");
ASSERT_TRUE(r);
ASSERT_EQ(res, 10000010000);
ASSERT_EQ(res, 100000100000000);
r = cryptonote::parse_amount(res, " 100.0000 ");
ASSERT_TRUE(r);
ASSERT_EQ(res, 10000000000);
ASSERT_EQ(res, 100000000000000);
r = cryptonote::parse_amount(res, " 100. 0000 ");
ASSERT_FALSE(r);