Extend the verifyFormat helper function to check that the expected text
is "stable". This provides some protection against bugs where formatting
results are ocilating between two forms, or continually change in some
other way.
Testing Done:
- Ran unit tests.
- Reproduced a known instability in preprocessor indentation which was caught by this new check (to be resolved in a later change.)
@ mzeren-vmw just a minor comment related to a change you made last year.
When FormatTest fails, all we are told is that it fails on line 75,or 77 (currently in trunk its 48,49) for every failure, with so many test cases written as "foo()" or "aaaaaa()" it can often be hard to pinpoint the exact test failure.
If verifyFormat was given an additional default argument of int line
Then verifyFormat could be used via a macro
The line numbers could then be passed as an additional failure message to gtest by passing the LINE of the test location down.
When the test fails we'd know the exact line of the test case that failed.
Also because of this, we get 2 failures for every failure, the second will almost always fail as well if the first case does (from what I can tell), is there anyway we can query the first failed result and not bother doing the second if the first one failed?