[FileCheck] Strengthen error checks in unit tests
authorThomas Preud'homme <thomasp@graphcore.ai>
Thu, 16 Jan 2020 12:14:13 +0000 (12:14 +0000)
committerThomas Preud'homme <thomasp@graphcore.ai>
Thu, 23 Jan 2020 11:31:53 +0000 (11:31 +0000)
commitf1ad192915f64e3eeedfb01aa1073e81bff4e1a1
tree261949b1b273b9a94137a3076d107eb2f6d9901a
parent03cae086f41c48a971329dc5a1f4a76c1c6af036
[FileCheck] Strengthen error checks in unit tests

Summary:
This commit adds error checking beyond UndefVarError and fix a number of
Error/Expected related idioms:
- use (EXPECT|ASSERT)_THAT_(ERROR|EXPECTED) instead of errorToBool or
  boolean operator
- ASSERT when a further check require the check to be successful to give
  a correct result

Reviewers: jhenderson, jdenny, probinson, grimar, arichardson, rnk

Reviewed By: jhenderson

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72914
llvm/unittests/Support/FileCheckTest.cpp