blob: 3b1d061b5b0731e0fd21540171297a65a5fd50cf [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
Ed Tanousc97c0412025-02-04 11:31:31 -08004#include <stdio.h>
Thu Nguyene42fb482024-10-15 14:43:11 +00005#include <libcper/BaseTypes.h>
Aushim Nagarkattiae8f6d92025-01-29 17:34:44 -08006#include <libcper/generator/sections/gen-section.h>
Ed Tanousa3663052025-03-16 12:54:36 -07007#include <json.h>
Lawrence Tangd34f2b12022-07-19 15:36:31 +01008
Ed Tanousd6b62632025-03-14 15:30:07 -07009// Controls whether required properties are added to the majority of property
10// definitions. This is useful for unit tests that are validating JSON where
11// all fields are valid
12enum class AddRequiredProps { YES, NO };
13
John Chungf8fc7052024-05-03 20:05:29 +080014FILE *generate_record_memstream(const char **types, UINT16 num_types,
15 char **buf, size_t *buf_size,
Aushim Nagarkattiae8f6d92025-01-29 17:34:44 -080016 int single_section,
17 GEN_VALID_BITS_TEST_TYPE validBitsType);
Ed Tanousd6b62632025-03-14 15:30:07 -070018
Ed Tanousa3663052025-03-16 12:54:36 -070019int schema_validate_from_file(json_object *to_test, int single_section,
20 int all_valid_bits);
Lawrence Tangd34f2b12022-07-19 15:36:31 +010021
John Chungf8fc7052024-05-03 20:05:29 +080022#endif