Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
test_utils.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint32_t to_uint32 (const std::string &s)
 
bytes to_bytes (const std::string &source)
 

Function Documentation

◆ to_bytes()

bytes to_bytes ( const std::string & source)

Definition at line 6 of file test_utils.hpp.

6 {
7 BOOST_REQUIRE(!(source.length() % 2));
8 bytes output(source.length()/2);
9 fc::from_hex(source, output.data(), output.size());
10 return output;
11}
uint8_t from_hex(char c)
Definition hex.cpp:6
vector< char > bytes
Definition types.hpp:243
const CharType(& source)[N]
Definition pointer.h:1204
Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_uint32()

uint32_t to_uint32 ( const std::string & s)

Definition at line 1 of file test_utils.hpp.

1 {
2 size_t l = s.size();
3 return (uint32_t)std::stoul(s.c_str(), &l, 16);
4}
unsigned int uint32_t
Definition stdint.h:126
char * s
int l
Here is the caller graph for this function: