blob: 42e41bc39d15dd7fe0353d62c8faf0a5c77e4413 [file] [log] [blame]
Lawrence Tangd34f2b12022-07-19 15:36:31 +01001#ifndef CPER_IR_TEST_UTILS_H
2#define CPER_IR_TEST_UTILS_H
3
Aushim Nagarkattiae8f6d92025-01-29 17:34:44 -08004#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 Tangd34f2b12022-07-19 15:36:31 +010010extern "C" {
Ed Tanousc97c0412025-02-04 11:31:31 -080011#include <stdio.h>
Thu Nguyene42fb482024-10-15 14:43:11 +000012#include <libcper/BaseTypes.h>
Aushim Nagarkattiae8f6d92025-01-29 17:34:44 -080013#include <libcper/generator/sections/gen-section.h>
Lawrence Tangd34f2b12022-07-19 15:36:31 +010014}
15
John Chungf8fc7052024-05-03 20:05:29 +080016FILE *generate_record_memstream(const char **types, UINT16 num_types,
17 char **buf, size_t *buf_size,
Aushim Nagarkattiae8f6d92025-01-29 17:34:44 -080018 int single_section,
19 GEN_VALID_BITS_TEST_TYPE validBitsType);
20int schema_validate_from_file(const char *file_path, nlohmann::json &jsonData,
21 std::string &error_message);
22nlohmann::json loadJson(const char *filePath);
Lawrence Tangd34f2b12022-07-19 15:36:31 +010023
John Chungf8fc7052024-05-03 20:05:29 +080024#endif