Fix FormatterTest.

In V, the behavior of Formatter became more strict. Adjusting tests to catch the correct exception and to remove asserts where behavior is different.

Bug: 332807070
Test: CtsLibcoreTestCases in goog/main with isStrictValidationEnabled
Test: always returning true.
Change-Id: I22e4801620be95b06eb56e695ba4b6324f7fda32
1 file changed