Matt Spinler | d3335df | 2019-07-10 11:04:21 -0500 | [diff] [blame^] | 1 | #include <filesystem> |
| 2 | #include <memory> |
| 3 | #include <vector> |
| 4 | |
| 5 | #include <gtest/gtest.h> |
| 6 | |
| 7 | /** |
| 8 | * @brief Tells the factory which PEL to create |
| 9 | */ |
| 10 | enum class TestPelType |
| 11 | { |
| 12 | pelSimple, |
| 13 | privateHeaderSimple |
| 14 | }; |
| 15 | |
| 16 | /** |
| 17 | * @brief PEL data factory, for testing |
| 18 | * |
| 19 | * @param[in] type - the type of data to create |
| 20 | * |
| 21 | * @return std::unique_ptr<std::vector<uint8_t>> - the PEL data |
| 22 | */ |
| 23 | std::unique_ptr<std::vector<uint8_t>> pelDataFactory(TestPelType type); |
| 24 | |
| 25 | /** |
| 26 | * @brief Helper function to read raw PEL data from a file |
| 27 | * |
| 28 | * @param[in] path - the path to read |
| 29 | * |
| 30 | * @return std::unique_ptr<std::vector<uint8_t>> - the data from the file |
| 31 | */ |
| 32 | std::unique_ptr<std::vector<uint8_t>> |
| 33 | readPELFile(const std::filesystem::path& path); |