Electroneum
PortableStorageFuzzer Class Reference
Inheritance diagram for PortableStorageFuzzer:
Collaboration diagram for PortableStorageFuzzer:

Public Member Functions

 PortableStorageFuzzer ()
 
virtual int init ()
 
virtual int run (const std::string &filename)
 
 PortableStorageFuzzer ()
 
virtual int init ()
 
virtual int run (const std::string &filename)
 

Detailed Description

Definition at line 36 of file load_from_binary.cpp.

Constructor & Destructor Documentation

◆ PortableStorageFuzzer() [1/2]

PortableStorageFuzzer::PortableStorageFuzzer ( )
inline

Definition at line 39 of file load_from_binary.cpp.

39 {}

◆ PortableStorageFuzzer() [2/2]

PortableStorageFuzzer::PortableStorageFuzzer ( )
inline

Definition at line 39 of file load_from_json.cpp.

39 {}

Member Function Documentation

◆ init() [1/2]

int PortableStorageFuzzer::init ( )
virtual

Reimplemented from Fuzzer.

Definition at line 44 of file load_from_binary.cpp.

45 {
46  return 0;
47 }

◆ init() [2/2]

virtual int PortableStorageFuzzer::init ( )
virtual

Reimplemented from Fuzzer.

◆ run() [1/2]

virtual int PortableStorageFuzzer::run ( const std::string &  filename)
virtual

Implements Fuzzer.

◆ run() [2/2]

int PortableStorageFuzzer::run ( const std::string &  filename)
virtual

Implements Fuzzer.

Definition at line 49 of file load_from_binary.cpp.

50 {
51  std::string s;
52 
54  {
55  std::cout << "Error: failed to load file " << filename << std::endl;
56  return 1;
57  }
58  try
59  {
61  ps.load_from_binary(s);
62  }
63  catch (const std::exception &e)
64  {
65  std::cerr << "Failed to load from binary: " << e.what() << std::endl;
66  return 1;
67  }
68  return 0;
69 }
::std::string string
Definition: gtest-port.h:1097
bool load_file_to_string(const std::string &path_to_file, std::string &target_str, size_t max_size=1000000000)
bool load_from_binary(const epee::span< const uint8_t > target)
Here is the call graph for this function:

The documentation for this class was generated from the following files: