I want to test serialized data conversion in my application, currently the object is stored in file and read the binary file and reloading the object.
In my unit test case I want to test this operation. As the file operations are costly I want to hard code the binary file content in the code itself.
How can I do this?
Currently I am trying like this,
std::string FileContent = "\00\00\00\00\00.........";
and it is not working.
xprefix. e.g.\x00\x00etcstd::vector<uint8_t>rather than a string?std::vector<uint8_t> FileContent = { 0x00, 0x00, 0x00, 0x00, 0x00, ... };