Monero
Macros | Functions
parse_amount.cpp File Reference
#include "gtest/gtest.h"
#include "cryptonote_basic/cryptonote_format_utils.h"
Include dependency graph for parse_amount.cpp:

Macros

#define TEST_pos(expected, str)
 
#define TEST_neg(str)
 
#define TEST_neg_n(str, name)
 

Functions

 TEST_pos (0, 0)
 
 TEST_pos (0, 00)
 
 TEST_pos (0, 00000000)
 
 TEST_pos (0, 000000000)
 
 TEST_pos (0, 00000000000000000000000000000000)
 
 TEST_pos (0, _0)
 
 TEST_pos (0, _00)
 
 TEST_pos (0, _00000000)
 
 TEST_pos (0, _000000000)
 
 TEST_pos (0, _00000000000000000000000000000000)
 
 TEST_pos (0, 00000000_)
 
 TEST_pos (0, 000000000_)
 
 TEST_pos (0, 00000000000000000000000000000000_)
 
 TEST_pos (0, 0_)
 
 TEST_pos (0, 0_0)
 
 TEST_pos (0, 0_00)
 
 TEST_pos (0, 0_00000000)
 
 TEST_pos (0, 0_000000000)
 
 TEST_pos (0, 0_00000000000000000000000000000000)
 
 TEST_pos (0, 00_)
 
 TEST_pos (0, 00_0)
 
 TEST_pos (0, 00_00)
 
 TEST_pos (0, 00_00000000)
 
 TEST_pos (0, 00_000000000)
 
 TEST_pos (0, 00_00000000000000000000000000000000)
 
 TEST_pos (1, 0_000000000001)
 
 TEST_pos (1, 0_0000000000010)
 
 TEST_pos (1, 0_0000000000010000000000000000000000000)
 
 TEST_pos (9, 0_000000000009)
 
 TEST_pos (9, 0_0000000000090)
 
 TEST_pos (9, 0_0000000000090000000000000000000000000)
 
 TEST_pos (1000000000000, 1)
 
 TEST_pos (10000000000000, 10)
 
 TEST_pos (100000000000000, 100)
 
 TEST_pos (1000000000000000, 1000)
 
 TEST_pos (6553500000000000, 6553_5)
 
 TEST_pos (429496729500000000, 429496_7295)
 
 TEST_pos (18446744073700000000, 18446744_0737)
 
 TEST_pos (18446744073700000000, 18446744_0737000)
 
 TEST_pos (18446744073700000000, 18446744_07370000)
 
 TEST_pos (18446744073700000000, 18446744_073700000)
 
 TEST_pos (18446744073700000000, 18446744_0737000000000000000)
 
 TEST_pos (18446744073709551615, 18446744_073709551615)
 
 TEST_neg_n (~, empty_string)
 
 TEST_neg_n (-0, minus_0)
 
 TEST_neg_n (+0, plus_0)
 
 TEST_neg_n (-1, minus_1)
 
 TEST_neg_n (+1, plus_1)
 
 TEST_neg_n (_, only_point)
 
 TEST_neg (0_0000000000001)
 
 TEST_neg (0_0000000000009)
 
 TEST_neg (184467440737_000000001)
 
 TEST_neg (184467440737_09551616)
 
 TEST_neg (184467440738)
 
 TEST_neg (18446744073709551616)
 
 TEST_neg (__)
 
 TEST_neg (0__)
 
 TEST_neg (__0)
 
 TEST_neg (0__0)
 
 TEST_neg (0_0_)
 
 TEST_neg (_0_0)
 
 TEST_neg (0_0_0)
 

Macro Definition Documentation

◆ TEST_neg

#define TEST_neg (   str)
Value:
TEST(parse_amount, handles_neg_ ## str) \
{ \
do_neg_test(#str); \
}
#define TEST(test_case_name, test_name)
Definition: gtest.h:2187
bool parse_amount(uint64_t &amount, const std::string &str_amount_)
Definition: cryptonote_format_utils.cpp:410
const char *const str
Definition: portlistingparse.c:23

◆ TEST_neg_n

#define TEST_neg_n (   str,
  name 
)
Value:
TEST(parse_amount, handles_neg_ ## name) \
{ \
do_neg_test(#str); \
}
#define TEST(test_case_name, test_name)
Definition: gtest.h:2187
bool parse_amount(uint64_t &amount, const std::string &str_amount_)
Definition: cryptonote_format_utils.cpp:410
const char *const str
Definition: portlistingparse.c:23
const char * name
Definition: options.c:30

◆ TEST_pos

#define TEST_pos (   expected,
  str 
)
Value:
TEST(parse_amount, handles_pos_ ## str) \
{ \
do_pos_test(UINT64_C(expected), #str); \
}
#define TEST(test_case_name, test_name)
Definition: gtest.h:2187
bool parse_amount(uint64_t &amount, const std::string &str_amount_)
Definition: cryptonote_format_utils.cpp:410
#define UINT64_C(val)
Definition: stdint.h:284
const char *const str
Definition: portlistingparse.c:23

Function Documentation

◆ TEST_neg() [1/13]

TEST_neg ( 0_0000000000001  )

◆ TEST_neg() [2/13]

TEST_neg ( 0_0000000000009  )

◆ TEST_neg() [3/13]

TEST_neg ( 184467440737_000000001  )

◆ TEST_neg() [4/13]

TEST_neg ( 184467440737_09551616  )

◆ TEST_neg() [5/13]

TEST_neg ( 184467440738  )

◆ TEST_neg() [6/13]

TEST_neg ( 18446744073709551616  )

◆ TEST_neg() [7/13]

TEST_neg ( __  )

◆ TEST_neg() [8/13]

TEST_neg ( 0__  )

◆ TEST_neg() [9/13]

TEST_neg ( __0  )

◆ TEST_neg() [10/13]

TEST_neg ( 0__0  )

◆ TEST_neg() [11/13]

TEST_neg ( 0_0_  )

◆ TEST_neg() [12/13]

TEST_neg ( _0_0  )

◆ TEST_neg() [13/13]

TEST_neg ( 0_0_0  )

◆ TEST_neg_n() [1/6]

TEST_neg_n ( ,
empty_string   
)

◆ TEST_neg_n() [2/6]

TEST_neg_n ( 0,
minus_0   
)

◆ TEST_neg_n() [3/6]

TEST_neg_n ( 0,
plus_0   
)

◆ TEST_neg_n() [4/6]

TEST_neg_n ( 1,
minus_1   
)

◆ TEST_neg_n() [5/6]

TEST_neg_n ( 1,
plus_1   
)

◆ TEST_neg_n() [6/6]

TEST_neg_n ( ,
only_point   
)

◆ TEST_pos() [1/43]

TEST_pos ( ,
 
)

◆ TEST_pos() [2/43]

TEST_pos ( ,
00   
)

◆ TEST_pos() [3/43]

TEST_pos ( ,
00000000   
)

◆ TEST_pos() [4/43]

TEST_pos ( ,
000000000   
)

◆ TEST_pos() [5/43]

TEST_pos ( ,
00000000000000000000000000000000   
)

◆ TEST_pos() [6/43]

TEST_pos ( ,
_0   
)

◆ TEST_pos() [7/43]

TEST_pos ( ,
_00   
)

◆ TEST_pos() [8/43]

TEST_pos ( ,
_00000000   
)

◆ TEST_pos() [9/43]

TEST_pos ( ,
_000000000   
)

◆ TEST_pos() [10/43]

TEST_pos ( ,
_00000000000000000000000000000000   
)

◆ TEST_pos() [11/43]

TEST_pos ( ,
00000000_   
)

◆ TEST_pos() [12/43]

TEST_pos ( ,
000000000_   
)

◆ TEST_pos() [13/43]

TEST_pos ( ,
00000000000000000000000000000000_   
)

◆ TEST_pos() [14/43]

TEST_pos ( ,
0_   
)

◆ TEST_pos() [15/43]

TEST_pos ( ,
0_0   
)

◆ TEST_pos() [16/43]

TEST_pos ( ,
0_00   
)

◆ TEST_pos() [17/43]

TEST_pos ( ,
0_00000000   
)

◆ TEST_pos() [18/43]

TEST_pos ( ,
0_000000000   
)

◆ TEST_pos() [19/43]

TEST_pos ( ,
0_00000000000000000000000000000000   
)

◆ TEST_pos() [20/43]

TEST_pos ( ,
00_   
)

◆ TEST_pos() [21/43]

TEST_pos ( ,
00_0   
)

◆ TEST_pos() [22/43]

TEST_pos ( ,
00_00   
)

◆ TEST_pos() [23/43]

TEST_pos ( ,
00_00000000   
)

◆ TEST_pos() [24/43]

TEST_pos ( ,
00_000000000   
)

◆ TEST_pos() [25/43]

TEST_pos ( ,
00_00000000000000000000000000000000   
)

◆ TEST_pos() [26/43]

TEST_pos ( ,
0_000000000001   
)

◆ TEST_pos() [27/43]

TEST_pos ( ,
0_0000000000010   
)

◆ TEST_pos() [28/43]

TEST_pos ( ,
0_0000000000010000000000000000000000000   
)

◆ TEST_pos() [29/43]

TEST_pos ( ,
0_000000000009   
)

◆ TEST_pos() [30/43]

TEST_pos ( ,
0_0000000000090   
)

◆ TEST_pos() [31/43]

TEST_pos ( ,
0_0000000000090000000000000000000000000   
)

◆ TEST_pos() [32/43]

TEST_pos ( 1000000000000  ,
 
)

◆ TEST_pos() [33/43]

TEST_pos ( 10000000000000  ,
10   
)

◆ TEST_pos() [34/43]

TEST_pos ( 100000000000000  ,
100   
)

◆ TEST_pos() [35/43]

TEST_pos ( 1000000000000000  ,
1000   
)

◆ TEST_pos() [36/43]

TEST_pos ( 6553500000000000  ,
6553_5   
)

◆ TEST_pos() [37/43]

TEST_pos ( 429496729500000000  ,
429496_7295   
)

◆ TEST_pos() [38/43]

TEST_pos ( 18446744073700000000  ,
18446744_0737   
)

◆ TEST_pos() [39/43]

TEST_pos ( 18446744073700000000  ,
18446744_0737000   
)

◆ TEST_pos() [40/43]

TEST_pos ( 18446744073700000000  ,
18446744_07370000   
)

◆ TEST_pos() [41/43]

TEST_pos ( 18446744073700000000  ,
18446744_073700000   
)

◆ TEST_pos() [42/43]

TEST_pos ( 18446744073700000000  ,
18446744_0737000000000000000   
)

◆ TEST_pos() [43/43]

TEST_pos ( 18446744073709551615  ,
18446744_073709551615   
)