Use parameterized unit tests to test FileCheck ExpressionValue API
rather than hand written code.
Honestly, my impression is that the code on the left reads much easier. And it is 100 lines shorter.
I am not familar with things like ::testing::TestWithParam though, may be there is a benefit of using it
that is not obvious to me atm.
I wonder what do other people think.
You can use INT64_MAX instead.
You can return here to avoid else:
ASSERT_THAT_EXPECTED(SignedActualValue, Succeeded()); EXPECT_EQ(*SignedExpectedValue, *SignedActualValue); return; }
Thanks for looking at this. This hasn't quite collapsed the code in the way that I imagined it would, so I'm happy for this idea to be abandoned if you don't think it is worthwhile. Otherwise, I'll take a look next week.
It could probably be quite shorter if there was a way to keep some parameter templated in the fixture (namely the distinction between signed and unsigned values). Unfortunately I had errors when I tried that.