Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 1 | /** |
| 2 | * Defines tests for validating CPER-JSON IR output from the cper-parse library. |
| 3 | * |
| 4 | * Author: Lawrence.Tang@arm.com |
| 5 | **/ |
| 6 | |
| 7 | #include "gtest/gtest.h" |
| 8 | #include "test-utils.hpp" |
| 9 | extern "C" { |
Lawrence Tang | 5202bbb | 2022-08-12 14:54:36 +0100 | [diff] [blame^] | 10 | #include <json.h> |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 11 | #include "../cper-parse.h" |
| 12 | #include "../json-schema.h" |
| 13 | #include "../generator/cper-generate.h" |
| 14 | } |
| 15 | |
| 16 | /* |
| 17 | * Test templates. |
| 18 | */ |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 19 | |
| 20 | //Tests a single randomly generated CPER section of the given type to ensure CPER-JSON IR validity. |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 21 | void cper_log_section_ir_test(const char *section_name, int single_section) |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 22 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 23 | //Generate full CPER record for the given type. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 24 | char *buf; |
| 25 | size_t size; |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 26 | FILE *record = generate_record_memstream(§ion_name, 1, &buf, &size, |
| 27 | single_section); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 28 | |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 29 | //Convert to IR, free resources. |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 30 | json_object *ir; |
| 31 | if (single_section) |
| 32 | ir = cper_single_section_to_ir(record); |
| 33 | else |
| 34 | ir = cper_to_ir(record); |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 35 | fclose(record); |
| 36 | free(buf); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 37 | |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 38 | //Validate against schema. |
| 39 | char error_message[JSON_ERROR_MSG_MAX_LEN] = { 0 }; |
| 40 | int valid = validate_schema_from_file("./specification/cper-json.json", |
| 41 | ir, error_message); |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 42 | ASSERT_TRUE(valid) |
| 43 | << "IR validation test failed (single section mode = " |
| 44 | << single_section << ") with message: " << error_message; |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 45 | } |
| 46 | |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 47 | //Checks for binary round-trip equality for a given randomly generated CPER record. |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 48 | void cper_log_section_binary_test(const char *section_name, int single_section) |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 49 | { |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 50 | //Generate CPER record for the given type. |
| 51 | char *buf; |
| 52 | size_t size; |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 53 | FILE *record = generate_record_memstream(§ion_name, 1, &buf, &size, |
| 54 | single_section); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 55 | |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 56 | //Convert to IR. |
| 57 | json_object *ir; |
| 58 | if (single_section) |
| 59 | ir = cper_single_section_to_ir(record); |
| 60 | else |
| 61 | ir = cper_to_ir(record); |
| 62 | |
| 63 | //Now convert back to binary, and get a stream out. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 64 | char *cper_buf; |
| 65 | size_t cper_buf_size; |
| 66 | FILE *stream = open_memstream(&cper_buf, &cper_buf_size); |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 67 | if (single_section) |
| 68 | ir_single_section_to_cper(ir, stream); |
| 69 | else |
| 70 | ir_to_cper(ir, stream); |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 71 | size_t cper_len = ftell(stream); |
| 72 | fclose(stream); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 73 | |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 74 | //Validate the two are identical. |
| 75 | ASSERT_GE(size, cper_len); |
| 76 | ASSERT_EQ(memcmp(buf, cper_buf, cper_len), 0) |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 77 | << "Binary output was not identical to input (single section mode = " |
| 78 | << single_section << ")."; |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 79 | |
| 80 | //Free everything up. |
| 81 | fclose(record); |
| 82 | free(buf); |
| 83 | free(cper_buf); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 84 | } |
| 85 | |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 86 | //Tests randomly generated CPER sections for IR validity of a given type, in both single section mode and full CPER log mode. |
| 87 | void cper_log_section_dual_ir_test(const char *section_name) |
| 88 | { |
| 89 | cper_log_section_ir_test(section_name, 0); |
| 90 | cper_log_section_ir_test(section_name, 1); |
| 91 | } |
| 92 | |
| 93 | //Tests randomly generated CPER sections for binary compatibility of a given type, in both single section mode and full CPER log mode. |
| 94 | void cper_log_section_dual_binary_test(const char *section_name) |
| 95 | { |
| 96 | cper_log_section_binary_test(section_name, 0); |
| 97 | cper_log_section_binary_test(section_name, 1); |
| 98 | } |
| 99 | |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 100 | /* |
| 101 | * Single section tests. |
| 102 | */ |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 103 | |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 104 | //Generic processor tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 105 | TEST(GenericProcessorTests, IRValid) |
| 106 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 107 | cper_log_section_dual_ir_test("generic"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 108 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 109 | TEST(GenericProcessorTests, BinaryEqual) |
| 110 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 111 | cper_log_section_dual_binary_test("generic"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | //IA32/x64 tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 115 | TEST(IA32x64Tests, IRValid) |
| 116 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 117 | cper_log_section_dual_ir_test("ia32x64"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 118 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 119 | TEST(IA32x64Tests, BinaryEqual) |
| 120 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 121 | cper_log_section_dual_binary_test("ia32x64"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 122 | } |
| 123 | |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 124 | // TEST(IPFTests, IRValid) { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 125 | // cper_log_section_dual_ir_test("ipf"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 126 | // } |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 127 | |
| 128 | //ARM tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 129 | TEST(ArmTests, IRValid) |
| 130 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 131 | cper_log_section_dual_ir_test("arm"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 132 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 133 | TEST(ArmTests, BinaryEqual) |
| 134 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 135 | cper_log_section_dual_binary_test("arm"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | //Memory tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 139 | TEST(MemoryTests, IRValid) |
| 140 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 141 | cper_log_section_dual_ir_test("memory"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 142 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 143 | TEST(MemoryTests, BinaryEqual) |
| 144 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 145 | cper_log_section_dual_binary_test("memory"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | //Memory 2 tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 149 | TEST(Memory2Tests, IRValid) |
| 150 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 151 | cper_log_section_dual_ir_test("memory2"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 152 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 153 | TEST(Memory2Tests, BinaryEqual) |
| 154 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 155 | cper_log_section_dual_binary_test("memory2"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 156 | } |
| 157 | |
| 158 | //PCIe tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 159 | TEST(PCIeTests, IRValid) |
| 160 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 161 | cper_log_section_dual_ir_test("pcie"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 162 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 163 | TEST(PCIeTests, BinaryEqual) |
| 164 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 165 | cper_log_section_dual_binary_test("pcie"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 166 | } |
| 167 | |
| 168 | //Firmware tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 169 | TEST(FirmwareTests, IRValid) |
| 170 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 171 | cper_log_section_dual_ir_test("firmware"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 172 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 173 | TEST(FirmwareTests, BinaryEqual) |
| 174 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 175 | cper_log_section_dual_binary_test("firmware"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | //PCI Bus tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 179 | TEST(PCIBusTests, IRValid) |
| 180 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 181 | cper_log_section_dual_ir_test("pcibus"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 182 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 183 | TEST(PCIBusTests, BinaryEqual) |
| 184 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 185 | cper_log_section_dual_binary_test("pcibus"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 186 | } |
| 187 | |
| 188 | //PCI Device tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 189 | TEST(PCIDevTests, IRValid) |
| 190 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 191 | cper_log_section_dual_ir_test("pcidev"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 192 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 193 | TEST(PCIDevTests, BinaryEqual) |
| 194 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 195 | cper_log_section_dual_binary_test("pcidev"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 196 | } |
| 197 | |
| 198 | //Generic DMAr tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 199 | TEST(DMArGenericTests, IRValid) |
| 200 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 201 | cper_log_section_dual_ir_test("dmargeneric"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 202 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 203 | TEST(DMArGenericTests, BinaryEqual) |
| 204 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 205 | cper_log_section_dual_binary_test("dmargeneric"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | //VT-d DMAr tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 209 | TEST(DMArVtdTests, IRValid) |
| 210 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 211 | cper_log_section_dual_ir_test("dmarvtd"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 212 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 213 | TEST(DMArVtdTests, BinaryEqual) |
| 214 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 215 | cper_log_section_dual_binary_test("dmarvtd"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 216 | } |
| 217 | |
| 218 | //IOMMU DMAr tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 219 | TEST(DMArIOMMUTests, IRValid) |
| 220 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 221 | cper_log_section_dual_ir_test("dmariommu"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 222 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 223 | TEST(DMArIOMMUTests, BinaryEqual) |
| 224 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 225 | cper_log_section_dual_binary_test("dmariommu"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 226 | } |
| 227 | |
| 228 | //CCIX PER tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 229 | TEST(CCIXPERTests, IRValid) |
| 230 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 231 | cper_log_section_dual_ir_test("ccixper"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 232 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 233 | TEST(CCIXPERTests, BinaryEqual) |
| 234 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 235 | cper_log_section_dual_binary_test("ccixper"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 236 | } |
| 237 | |
| 238 | //CXL Protocol tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 239 | TEST(CXLProtocolTests, IRValid) |
| 240 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 241 | cper_log_section_dual_ir_test("cxlprotocol"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 242 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 243 | TEST(CXLProtocolTests, BinaryEqual) |
| 244 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 245 | cper_log_section_dual_binary_test("cxlprotocol"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | //CXL Component tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 249 | TEST(CXLComponentTests, IRValid) |
| 250 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 251 | cper_log_section_dual_ir_test("cxlcomponent"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 252 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 253 | TEST(CXLComponentTests, BinaryEqual) |
| 254 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 255 | cper_log_section_dual_binary_test("cxlcomponent"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 256 | } |
| 257 | |
| 258 | //Unknown section tests. |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 259 | TEST(UnknownSectionTests, IRValid) |
| 260 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 261 | cper_log_section_dual_ir_test("unknown"); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 262 | } |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 263 | TEST(UnknownSectionTests, BinaryEqual) |
| 264 | { |
Lawrence Tang | a4f662f | 2022-08-08 14:37:36 +0100 | [diff] [blame] | 265 | cper_log_section_dual_binary_test("unknown"); |
Lawrence Tang | cd50520 | 2022-07-19 16:55:11 +0100 | [diff] [blame] | 266 | } |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 267 | |
| 268 | //Entrypoint for the testing program. |
| 269 | int main() |
| 270 | { |
Lawrence Tang | e407b4c | 2022-07-21 13:54:01 +0100 | [diff] [blame] | 271 | testing::InitGoogleTest(); |
| 272 | return RUN_ALL_TESTS(); |
Lawrence Tang | d34f2b1 | 2022-07-19 15:36:31 +0100 | [diff] [blame] | 273 | } |