[PATCH] D60390: FileCheck [10/12]: Add support for signed numeric values

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 01:02:43 PDT 2020


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

LGTM, with nit.

Re. TEST_P, the best suggestion I've got is look at the examples in DWARFDebugLineTest.cpp, where I've used a few different tricks to achieve the goal of code re-use. In particular, `AdjustAddressFixtureBase` related test cases might be interesting to you. In your case, I'd probably have a set of parameters each for failing and passing combinations, and for addition and subtraction, for a total of 4 combinations, if I'm not mistaken. You'd have thin fixtures for each, but they could probably share some code via a base class.

That all being said, only make those changes if you think they are worthwhile. I'm happy enough with this as-is.



================
Comment at: llvm/unittests/Support/FileCheckTest.cpp:422
+  // Test both negative values.
+  expectOperationValueResult(operator+, - 10, - 10, - 20);
+
----------------
Here and in various other places, not sure you want the space between `-` and `10` (same for `- 20` and various cases below).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60390/new/

https://reviews.llvm.org/D60390





More information about the llvm-commits mailing list