<i18n dev> RFR: 8253459: Formatter treats index, width and precision > Integer.MAX_VALUE incorrectly [v9]

Stuart Marks smarks at openjdk.java.net
Tue Nov 17 23:57:13 UTC 2020

On Tue, 17 Nov 2020 21:21:47 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Ian Graves has updated the pull request incrementally with one additional commit since the last revision:
>>   Adding test coverage. Tweaking wording in docs.
> test/jdk/java/util/IllegalFormatException/ArgumentIndexException.java line 1:
>> 1: /*
> Typically, using the TestNG framework is preferable for new tests.
> In addition to a convenient set of Asserts that check and print expected vs actual and message
> it includes patterns for testing for expected exceptions.

Yes, these tests are amenable to TestNG's `assertThrows` method. That might be all you need; we generally aren't too concerned about the exact content and formatting of the exception's message. However, if you want to make additional assertions over the thrown exception, it can be obtained using `expectThrows` instead of `assertThrows`.


PR: https://git.openjdk.java.net/jdk/pull/516

More information about the i18n-dev mailing list