// RUN: rm -rf %t.json // RUN: clang-ssaf-format -type=tu %S/Inputs/tu-summary.json -o %t.json // RUN: diff %S/Inputs/tu-summary.json %t.json // Negative tests: // RUN: not clang-ssaf-format -type=tu %S/Inputs/tu-summary-no-key.json 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-MISSING-KEY // CHECK-MISSING-KEY: saw an object of 1 key(s) but expected an Object with a key UnsafeBuffers // RUN: not clang-ssaf-format -type=tu %S/Inputs/tu-summary-bad-element.json 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-BAD-ELEMENT // CHECK-BAD-ELEMENT: saw 42 but expected an array with exactly two elements representing EntityId and PointerLevel, respectively // RUN: not clang-ssaf-format -type=tu %S/Inputs/tu-summary-bad-ptr-level.json 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-BAD-PTR-LEVEL // CHECK-BAD-PTR-LEVEL: saw "not-an-integer" but expected an integer representing PointerLevel