HomePhabricator

[FileCheck] Strengthen error checks in unit tests

Authored by thopre on Jan 16 2020, 4:14 AM.

Description

[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