Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 1 | #ifndef CPER_IR_TEST_UTILS_H |
| 2 | #define CPER_IR_TEST_UTILS_H |
| 3 | |
Aushim Nagarkatti | ae8f6d9 | 2025-01-29 17:34:44 -0800 | [diff] [blame^] | 4 | #include <valijson/adapters/nlohmann_json_adapter.hpp> |
| 5 | #include <valijson/schema.hpp> |
| 6 | #include <valijson/schema_parser.hpp> |
| 7 | #include <valijson/validator.hpp> |
| 8 | #include <nlohmann/json.hpp> |
| 9 | |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 10 | extern "C" { |
Ed Tanous | c97c041 | 2025-02-04 11:31:31 -0800 | [diff] [blame] | 11 | #include <stdio.h> |
Thu Nguyen | e42fb48 | 2024-10-15 14:43:11 +0000 | [diff] [blame] | 12 | #include <libcper/BaseTypes.h> |
Aushim Nagarkatti | ae8f6d9 | 2025-01-29 17:34:44 -0800 | [diff] [blame^] | 13 | #include <libcper/generator/sections/gen-section.h> |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 14 | } |
| 15 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 16 | FILE *generate_record_memstream(const char **types, UINT16 num_types, |
| 17 | char **buf, size_t *buf_size, |
Aushim Nagarkatti | ae8f6d9 | 2025-01-29 17:34:44 -0800 | [diff] [blame^] | 18 | int single_section, |
| 19 | GEN_VALID_BITS_TEST_TYPE validBitsType); |
| 20 | int schema_validate_from_file(const char *file_path, nlohmann::json &jsonData, |
| 21 | std::string &error_message); |
| 22 | nlohmann::json loadJson(const char *filePath); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 23 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 24 | #endif |