Java Code Examples for java.time.format.SignStyle#ALWAYS
The following examples show how to use
java.time.format.SignStyle#ALWAYS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TCKSignStyle.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="signStyle") Object[][] data_signStyle() { return new Object[][] { {LocalDate.of(0, 10, 2), SignStyle.ALWAYS, null, "+00"}, {LocalDate.of(2001, 10, 2), SignStyle.ALWAYS, null, "+2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.ALWAYS, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NORMAL, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NORMAL, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NOT_NEGATIVE, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, {LocalDate.of(0, 10, 2), SignStyle.EXCEEDS_PAD, null, "00"}, {LocalDate.of(1, 10, 2), SignStyle.EXCEEDS_PAD, null, "01"}, {LocalDate.of(-1, 10, 2), SignStyle.EXCEEDS_PAD, null, "-01"}, {LocalDate.of(20001, 10, 2), SignStyle.ALWAYS, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NORMAL, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NEVER, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.EXCEEDS_PAD, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, }; }
Example 2
Source File: TCKSignStyle.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="signStyle") Object[][] data_signStyle() { return new Object[][] { {LocalDate.of(0, 10, 2), SignStyle.ALWAYS, null, "+00"}, {LocalDate.of(2001, 10, 2), SignStyle.ALWAYS, null, "+2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.ALWAYS, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NORMAL, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NORMAL, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NOT_NEGATIVE, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, {LocalDate.of(0, 10, 2), SignStyle.EXCEEDS_PAD, null, "00"}, {LocalDate.of(1, 10, 2), SignStyle.EXCEEDS_PAD, null, "01"}, {LocalDate.of(-1, 10, 2), SignStyle.EXCEEDS_PAD, null, "-01"}, {LocalDate.of(20001, 10, 2), SignStyle.ALWAYS, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NORMAL, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NEVER, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.EXCEEDS_PAD, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, }; }
Example 3
Source File: TCKSignStyle.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="signStyle") Object[][] data_signStyle() { return new Object[][] { {LocalDate.of(0, 10, 2), SignStyle.ALWAYS, null, "+00"}, {LocalDate.of(2001, 10, 2), SignStyle.ALWAYS, null, "+2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.ALWAYS, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NORMAL, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NORMAL, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NOT_NEGATIVE, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, {LocalDate.of(0, 10, 2), SignStyle.EXCEEDS_PAD, null, "00"}, {LocalDate.of(1, 10, 2), SignStyle.EXCEEDS_PAD, null, "01"}, {LocalDate.of(-1, 10, 2), SignStyle.EXCEEDS_PAD, null, "-01"}, {LocalDate.of(20001, 10, 2), SignStyle.ALWAYS, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NORMAL, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NEVER, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.EXCEEDS_PAD, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, }; }
Example 4
Source File: TCKSignStyle.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="signStyle") Object[][] data_signStyle() { return new Object[][] { {LocalDate.of(0, 10, 2), SignStyle.ALWAYS, null, "+00"}, {LocalDate.of(2001, 10, 2), SignStyle.ALWAYS, null, "+2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.ALWAYS, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NORMAL, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NORMAL, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NOT_NEGATIVE, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, {LocalDate.of(0, 10, 2), SignStyle.EXCEEDS_PAD, null, "00"}, {LocalDate.of(1, 10, 2), SignStyle.EXCEEDS_PAD, null, "01"}, {LocalDate.of(-1, 10, 2), SignStyle.EXCEEDS_PAD, null, "-01"}, {LocalDate.of(20001, 10, 2), SignStyle.ALWAYS, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NORMAL, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NEVER, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.EXCEEDS_PAD, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, }; }
Example 5
Source File: TCKSignStyle.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="signStyle") Object[][] data_signStyle() { return new Object[][] { {LocalDate.of(0, 10, 2), SignStyle.ALWAYS, null, "+00"}, {LocalDate.of(2001, 10, 2), SignStyle.ALWAYS, null, "+2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.ALWAYS, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NORMAL, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NORMAL, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NOT_NEGATIVE, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, {LocalDate.of(0, 10, 2), SignStyle.EXCEEDS_PAD, null, "00"}, {LocalDate.of(1, 10, 2), SignStyle.EXCEEDS_PAD, null, "01"}, {LocalDate.of(-1, 10, 2), SignStyle.EXCEEDS_PAD, null, "-01"}, {LocalDate.of(20001, 10, 2), SignStyle.ALWAYS, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NORMAL, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NEVER, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.EXCEEDS_PAD, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, }; }
Example 6
Source File: TCKSignStyle.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="signStyle") Object[][] data_signStyle() { return new Object[][] { {LocalDate.of(0, 10, 2), SignStyle.ALWAYS, null, "+00"}, {LocalDate.of(2001, 10, 2), SignStyle.ALWAYS, null, "+2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.ALWAYS, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NORMAL, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NORMAL, null, "-2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NEVER, null, "2001"}, {LocalDate.of(2001, 10, 2), SignStyle.NOT_NEGATIVE, null, "2001"}, {LocalDate.of(-2001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, {LocalDate.of(0, 10, 2), SignStyle.EXCEEDS_PAD, null, "00"}, {LocalDate.of(1, 10, 2), SignStyle.EXCEEDS_PAD, null, "01"}, {LocalDate.of(-1, 10, 2), SignStyle.EXCEEDS_PAD, null, "-01"}, {LocalDate.of(20001, 10, 2), SignStyle.ALWAYS, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NORMAL, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NEVER, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.EXCEEDS_PAD, DateTimeException.class, ""}, {LocalDate.of(20001, 10, 2), SignStyle.NOT_NEGATIVE, DateTimeException.class, ""}, }; }
Example 7
Source File: TestNumberParser.java From j2objc with Apache License 2.0 | 4 votes |
@DataProvider public static Object[][] provider_parseSignsLenient() { return new Object[][] { // never {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"50", 1, 2, SignStyle.NEVER, 2, 50}, {"500", 1, 2, SignStyle.NEVER, 3, 500}, {"-0", 1, 2, SignStyle.NEVER, 2, 0}, {"-5", 1, 2, SignStyle.NEVER, 2, -5}, {"-50", 1, 2, SignStyle.NEVER, 3, -50}, {"-500", 1, 2, SignStyle.NEVER, 4, -500}, {"-AAA", 1, 2, SignStyle.NEVER, 1, null}, {"+0", 1, 2, SignStyle.NEVER, 2, 0}, {"+5", 1, 2, SignStyle.NEVER, 2, 5}, {"+50", 1, 2, SignStyle.NEVER, 3, 50}, {"+500", 1, 2, SignStyle.NEVER, 4, 500}, {"+AAA", 1, 2, SignStyle.NEVER, 1, null}, {"50", 2, 2, SignStyle.NEVER, 2, 50}, {"-50", 2, 2, SignStyle.NEVER, 0, null}, {"+50", 2, 2, SignStyle.NEVER, 0, null}, // not negative {"0", 1, 2, SignStyle.NOT_NEGATIVE, 1, 0}, {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"50", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"500", 1, 2, SignStyle.NOT_NEGATIVE, 3, 500}, {"-0", 1, 2, SignStyle.NOT_NEGATIVE, 2, 0}, {"-5", 1, 2, SignStyle.NOT_NEGATIVE, 2, -5}, {"-50", 1, 2, SignStyle.NOT_NEGATIVE, 3, -50}, {"-500", 1, 2, SignStyle.NOT_NEGATIVE, 4, -500}, {"-AAA", 1, 2, SignStyle.NOT_NEGATIVE, 1, null}, {"+0", 1, 2, SignStyle.NOT_NEGATIVE, 2, 0}, {"+5", 1, 2, SignStyle.NOT_NEGATIVE, 2, 5}, {"+50", 1, 2, SignStyle.NOT_NEGATIVE, 3, 50}, {"+500", 1, 2, SignStyle.NOT_NEGATIVE, 4, 500}, {"+AAA", 1, 2, SignStyle.NOT_NEGATIVE, 1, null}, {"50", 2, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"-50", 2, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+50", 2, 2, SignStyle.NOT_NEGATIVE, 0, null}, // normal {"0", 1, 2, SignStyle.NORMAL, 1, 0}, {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"50", 1, 2, SignStyle.NORMAL, 2, 50}, {"500", 1, 2, SignStyle.NORMAL, 3, 500}, {"-0", 1, 2, SignStyle.NORMAL, 2, 0}, {"-5", 1, 2, SignStyle.NORMAL, 2, -5}, {"-50", 1, 2, SignStyle.NORMAL, 3, -50}, {"-500", 1, 2, SignStyle.NORMAL, 4, -500}, {"-AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"+0", 1, 2, SignStyle.NORMAL, 2, 0}, {"+5", 1, 2, SignStyle.NORMAL, 2, 5}, {"+50", 1, 2, SignStyle.NORMAL, 3, 50}, {"+500", 1, 2, SignStyle.NORMAL, 4, 500}, {"+AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"50", 2, 2, SignStyle.NORMAL, 2, 50}, {"-50", 2, 2, SignStyle.NORMAL, 3, -50}, {"+50", 2, 2, SignStyle.NORMAL, 3, 50}, // always {"0", 1, 2, SignStyle.ALWAYS, 1, 0}, {"5", 1, 2, SignStyle.ALWAYS, 1, 5}, {"50", 1, 2, SignStyle.ALWAYS, 2, 50}, {"500", 1, 2, SignStyle.ALWAYS, 3, 500}, {"-0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"-5", 1, 2, SignStyle.ALWAYS, 2, -5}, {"-50", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-500", 1, 2, SignStyle.ALWAYS, 4, -500}, {"-AAA", 1, 2, SignStyle.ALWAYS, 1, null}, {"+0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"+5", 1, 2, SignStyle.ALWAYS, 2, 5}, {"+50", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+500", 1, 2, SignStyle.ALWAYS, 4, 500}, {"+AAA", 1, 2, SignStyle.ALWAYS, 1, null}, // exceeds pad {"0", 1, 2, SignStyle.EXCEEDS_PAD, 1, 0}, {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"50", 1, 2, SignStyle.EXCEEDS_PAD, 2, 50}, {"500", 1, 2, SignStyle.EXCEEDS_PAD, 3, 500}, {"-0", 1, 2, SignStyle.EXCEEDS_PAD, 2, 0}, {"-5", 1, 2, SignStyle.EXCEEDS_PAD, 2, -5}, {"-50", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-500", 1, 2, SignStyle.EXCEEDS_PAD, 4, -500}, {"-AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, {"+0", 1, 2, SignStyle.EXCEEDS_PAD, 2, 0}, {"+5", 1, 2, SignStyle.EXCEEDS_PAD, 2, 5}, {"+50", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+500", 1, 2, SignStyle.EXCEEDS_PAD, 4, 500}, {"+AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, }; }
Example 8
Source File: TestNumberParser.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseSignsStrict") Object[][] provider_parseSignsStrict() { return new Object[][] { // basics {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"1", 1, 2, SignStyle.NEVER, 1, 1}, {"2", 1, 2, SignStyle.NEVER, 1, 2}, {"3", 1, 2, SignStyle.NEVER, 1, 3}, {"4", 1, 2, SignStyle.NEVER, 1, 4}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"6", 1, 2, SignStyle.NEVER, 1, 6}, {"7", 1, 2, SignStyle.NEVER, 1, 7}, {"8", 1, 2, SignStyle.NEVER, 1, 8}, {"9", 1, 2, SignStyle.NEVER, 1, 9}, {"10", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 3, SignStyle.NEVER, 3, 100}, // never {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"50", 1, 2, SignStyle.NEVER, 2, 50}, {"500", 1, 2, SignStyle.NEVER, 2, 50}, {"-0", 1, 2, SignStyle.NEVER, 0, null}, {"-5", 1, 2, SignStyle.NEVER, 0, null}, {"-50", 1, 2, SignStyle.NEVER, 0, null}, {"-500", 1, 2, SignStyle.NEVER, 0, null}, {"-AAA", 1, 2, SignStyle.NEVER, 0, null}, {"+0", 1, 2, SignStyle.NEVER, 0, null}, {"+5", 1, 2, SignStyle.NEVER, 0, null}, {"+50", 1, 2, SignStyle.NEVER, 0, null}, {"+500", 1, 2, SignStyle.NEVER, 0, null}, {"+AAA", 1, 2, SignStyle.NEVER, 0, null}, // not negative {"0", 1, 2, SignStyle.NOT_NEGATIVE, 1, 0}, {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"50", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"500", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"-0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, // normal {"0", 1, 2, SignStyle.NORMAL, 1, 0}, {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"50", 1, 2, SignStyle.NORMAL, 2, 50}, {"500", 1, 2, SignStyle.NORMAL, 2, 50}, {"-0", 1, 2, SignStyle.NORMAL, 0, null}, {"-5", 1, 2, SignStyle.NORMAL, 2, -5}, {"-50", 1, 2, SignStyle.NORMAL, 3, -50}, {"-500", 1, 2, SignStyle.NORMAL, 3, -50}, {"-AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"+0", 1, 2, SignStyle.NORMAL, 0, null}, {"+5", 1, 2, SignStyle.NORMAL, 0, null}, {"+50", 1, 2, SignStyle.NORMAL, 0, null}, {"+500", 1, 2, SignStyle.NORMAL, 0, null}, {"+AAA", 1, 2, SignStyle.NORMAL, 0, null}, // always {"0", 1, 2, SignStyle.ALWAYS, 0, null}, {"5", 1, 2, SignStyle.ALWAYS, 0, null}, {"50", 1, 2, SignStyle.ALWAYS, 0, null}, {"500", 1, 2, SignStyle.ALWAYS, 0, null}, {"-0", 1, 2, SignStyle.ALWAYS, 0, null}, {"-5", 1, 2, SignStyle.ALWAYS, 2, -5}, {"-50", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-500", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-AAA", 1, 2, SignStyle.ALWAYS, 1, null}, {"+0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"+5", 1, 2, SignStyle.ALWAYS, 2, 5}, {"+50", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+500", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+AAA", 1, 2, SignStyle.ALWAYS, 1, null}, // exceeds pad {"0", 1, 2, SignStyle.EXCEEDS_PAD, 1, 0}, {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"50", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"500", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-5", 1, 2, SignStyle.EXCEEDS_PAD, 2, -5}, {"-50", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-500", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, {"+0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+5", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+50", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+500", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, }; }
Example 9
Source File: TestNumberParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseSignsStrict") Object[][] provider_parseSignsStrict() { return new Object[][] { // basics {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"1", 1, 2, SignStyle.NEVER, 1, 1}, {"2", 1, 2, SignStyle.NEVER, 1, 2}, {"3", 1, 2, SignStyle.NEVER, 1, 3}, {"4", 1, 2, SignStyle.NEVER, 1, 4}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"6", 1, 2, SignStyle.NEVER, 1, 6}, {"7", 1, 2, SignStyle.NEVER, 1, 7}, {"8", 1, 2, SignStyle.NEVER, 1, 8}, {"9", 1, 2, SignStyle.NEVER, 1, 9}, {"10", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 3, SignStyle.NEVER, 3, 100}, // never {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"50", 1, 2, SignStyle.NEVER, 2, 50}, {"500", 1, 2, SignStyle.NEVER, 2, 50}, {"-0", 1, 2, SignStyle.NEVER, 0, null}, {"-5", 1, 2, SignStyle.NEVER, 0, null}, {"-50", 1, 2, SignStyle.NEVER, 0, null}, {"-500", 1, 2, SignStyle.NEVER, 0, null}, {"-AAA", 1, 2, SignStyle.NEVER, 0, null}, {"+0", 1, 2, SignStyle.NEVER, 0, null}, {"+5", 1, 2, SignStyle.NEVER, 0, null}, {"+50", 1, 2, SignStyle.NEVER, 0, null}, {"+500", 1, 2, SignStyle.NEVER, 0, null}, {"+AAA", 1, 2, SignStyle.NEVER, 0, null}, // not negative {"0", 1, 2, SignStyle.NOT_NEGATIVE, 1, 0}, {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"50", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"500", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"-0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, // normal {"0", 1, 2, SignStyle.NORMAL, 1, 0}, {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"50", 1, 2, SignStyle.NORMAL, 2, 50}, {"500", 1, 2, SignStyle.NORMAL, 2, 50}, {"-0", 1, 2, SignStyle.NORMAL, 0, null}, {"-5", 1, 2, SignStyle.NORMAL, 2, -5}, {"-50", 1, 2, SignStyle.NORMAL, 3, -50}, {"-500", 1, 2, SignStyle.NORMAL, 3, -50}, {"-AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"+0", 1, 2, SignStyle.NORMAL, 0, null}, {"+5", 1, 2, SignStyle.NORMAL, 0, null}, {"+50", 1, 2, SignStyle.NORMAL, 0, null}, {"+500", 1, 2, SignStyle.NORMAL, 0, null}, {"+AAA", 1, 2, SignStyle.NORMAL, 0, null}, // always {"0", 1, 2, SignStyle.ALWAYS, 0, null}, {"5", 1, 2, SignStyle.ALWAYS, 0, null}, {"50", 1, 2, SignStyle.ALWAYS, 0, null}, {"500", 1, 2, SignStyle.ALWAYS, 0, null}, {"-0", 1, 2, SignStyle.ALWAYS, 0, null}, {"-5", 1, 2, SignStyle.ALWAYS, 2, -5}, {"-50", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-500", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-AAA", 1, 2, SignStyle.ALWAYS, 1, null}, {"+0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"+5", 1, 2, SignStyle.ALWAYS, 2, 5}, {"+50", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+500", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+AAA", 1, 2, SignStyle.ALWAYS, 1, null}, // exceeds pad {"0", 1, 2, SignStyle.EXCEEDS_PAD, 1, 0}, {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"50", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"500", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-5", 1, 2, SignStyle.EXCEEDS_PAD, 2, -5}, {"-50", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-500", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, {"+0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+5", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+50", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+500", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, }; }
Example 10
Source File: TestNumberParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseDigitsLenient") Object[][] provider_parseDigitsLenient() { return new Object[][] { // never {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"5", 2, 2, SignStyle.NEVER, 1, 5}, {"54", 1, 3, SignStyle.NEVER, 2, 54}, {"54", 2, 3, SignStyle.NEVER, 2, 54}, {"54", 3, 3, SignStyle.NEVER, 2, 54}, {"543", 1, 3, SignStyle.NEVER, 3, 543}, {"543", 2, 3, SignStyle.NEVER, 3, 543}, {"543", 3, 3, SignStyle.NEVER, 3, 543}, {"5432", 1, 3, SignStyle.NEVER, 4, 5432}, {"5432", 2, 3, SignStyle.NEVER, 4, 5432}, {"5432", 3, 3, SignStyle.NEVER, 4, 5432}, {"5AAA", 2, 3, SignStyle.NEVER, 1, 5}, // not negative {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"5", 2, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"54", 1, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 2, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 3, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"543", 1, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 2, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 3, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"5432", 1, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 2, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 3, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5AAA", 2, 3, SignStyle.NOT_NEGATIVE, 1, 5}, // normal {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"5", 2, 2, SignStyle.NORMAL, 1, 5}, {"54", 1, 3, SignStyle.NORMAL, 2, 54}, {"54", 2, 3, SignStyle.NORMAL, 2, 54}, {"54", 3, 3, SignStyle.NORMAL, 2, 54}, {"543", 1, 3, SignStyle.NORMAL, 3, 543}, {"543", 2, 3, SignStyle.NORMAL, 3, 543}, {"543", 3, 3, SignStyle.NORMAL, 3, 543}, {"5432", 1, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 2, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 3, 3, SignStyle.NORMAL, 4, 5432}, {"5AAA", 2, 3, SignStyle.NORMAL, 1, 5}, // always {"5", 1, 2, SignStyle.ALWAYS, 1, 5}, {"5", 2, 2, SignStyle.ALWAYS, 1, 5}, {"54", 1, 3, SignStyle.ALWAYS, 2, 54}, {"54", 2, 3, SignStyle.ALWAYS, 2, 54}, {"54", 3, 3, SignStyle.ALWAYS, 2, 54}, {"543", 1, 3, SignStyle.ALWAYS, 3, 543}, {"543", 2, 3, SignStyle.ALWAYS, 3, 543}, {"543", 3, 3, SignStyle.ALWAYS, 3, 543}, {"5432", 1, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 2, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 3, 3, SignStyle.ALWAYS, 4, 5432}, {"5AAA", 2, 3, SignStyle.ALWAYS, 1, 5}, // exceeds pad {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"5", 2, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"54", 1, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 2, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 3, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"543", 1, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 2, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 3, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"5432", 1, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 2, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 3, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5AAA", 2, 3, SignStyle.EXCEEDS_PAD, 1, 5}, }; }
Example 11
Source File: TestNumberParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseSignsLenient") Object[][] provider_parseSignsLenient() { return new Object[][] { // never {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"50", 1, 2, SignStyle.NEVER, 2, 50}, {"500", 1, 2, SignStyle.NEVER, 3, 500}, {"-0", 1, 2, SignStyle.NEVER, 2, 0}, {"-5", 1, 2, SignStyle.NEVER, 2, -5}, {"-50", 1, 2, SignStyle.NEVER, 3, -50}, {"-500", 1, 2, SignStyle.NEVER, 4, -500}, {"-AAA", 1, 2, SignStyle.NEVER, 1, null}, {"+0", 1, 2, SignStyle.NEVER, 2, 0}, {"+5", 1, 2, SignStyle.NEVER, 2, 5}, {"+50", 1, 2, SignStyle.NEVER, 3, 50}, {"+500", 1, 2, SignStyle.NEVER, 4, 500}, {"+AAA", 1, 2, SignStyle.NEVER, 1, null}, {"50", 2, 2, SignStyle.NEVER, 2, 50}, {"-50", 2, 2, SignStyle.NEVER, 0, null}, {"+50", 2, 2, SignStyle.NEVER, 0, null}, // not negative {"0", 1, 2, SignStyle.NOT_NEGATIVE, 1, 0}, {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"50", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"500", 1, 2, SignStyle.NOT_NEGATIVE, 3, 500}, {"-0", 1, 2, SignStyle.NOT_NEGATIVE, 2, 0}, {"-5", 1, 2, SignStyle.NOT_NEGATIVE, 2, -5}, {"-50", 1, 2, SignStyle.NOT_NEGATIVE, 3, -50}, {"-500", 1, 2, SignStyle.NOT_NEGATIVE, 4, -500}, {"-AAA", 1, 2, SignStyle.NOT_NEGATIVE, 1, null}, {"+0", 1, 2, SignStyle.NOT_NEGATIVE, 2, 0}, {"+5", 1, 2, SignStyle.NOT_NEGATIVE, 2, 5}, {"+50", 1, 2, SignStyle.NOT_NEGATIVE, 3, 50}, {"+500", 1, 2, SignStyle.NOT_NEGATIVE, 4, 500}, {"+AAA", 1, 2, SignStyle.NOT_NEGATIVE, 1, null}, {"50", 2, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"-50", 2, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+50", 2, 2, SignStyle.NOT_NEGATIVE, 0, null}, // normal {"0", 1, 2, SignStyle.NORMAL, 1, 0}, {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"50", 1, 2, SignStyle.NORMAL, 2, 50}, {"500", 1, 2, SignStyle.NORMAL, 3, 500}, {"-0", 1, 2, SignStyle.NORMAL, 2, 0}, {"-5", 1, 2, SignStyle.NORMAL, 2, -5}, {"-50", 1, 2, SignStyle.NORMAL, 3, -50}, {"-500", 1, 2, SignStyle.NORMAL, 4, -500}, {"-AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"+0", 1, 2, SignStyle.NORMAL, 2, 0}, {"+5", 1, 2, SignStyle.NORMAL, 2, 5}, {"+50", 1, 2, SignStyle.NORMAL, 3, 50}, {"+500", 1, 2, SignStyle.NORMAL, 4, 500}, {"+AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"50", 2, 2, SignStyle.NORMAL, 2, 50}, {"-50", 2, 2, SignStyle.NORMAL, 3, -50}, {"+50", 2, 2, SignStyle.NORMAL, 3, 50}, // always {"0", 1, 2, SignStyle.ALWAYS, 1, 0}, {"5", 1, 2, SignStyle.ALWAYS, 1, 5}, {"50", 1, 2, SignStyle.ALWAYS, 2, 50}, {"500", 1, 2, SignStyle.ALWAYS, 3, 500}, {"-0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"-5", 1, 2, SignStyle.ALWAYS, 2, -5}, {"-50", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-500", 1, 2, SignStyle.ALWAYS, 4, -500}, {"-AAA", 1, 2, SignStyle.ALWAYS, 1, null}, {"+0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"+5", 1, 2, SignStyle.ALWAYS, 2, 5}, {"+50", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+500", 1, 2, SignStyle.ALWAYS, 4, 500}, {"+AAA", 1, 2, SignStyle.ALWAYS, 1, null}, // exceeds pad {"0", 1, 2, SignStyle.EXCEEDS_PAD, 1, 0}, {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"50", 1, 2, SignStyle.EXCEEDS_PAD, 2, 50}, {"500", 1, 2, SignStyle.EXCEEDS_PAD, 3, 500}, {"-0", 1, 2, SignStyle.EXCEEDS_PAD, 2, 0}, {"-5", 1, 2, SignStyle.EXCEEDS_PAD, 2, -5}, {"-50", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-500", 1, 2, SignStyle.EXCEEDS_PAD, 4, -500}, {"-AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, {"+0", 1, 2, SignStyle.EXCEEDS_PAD, 2, 0}, {"+5", 1, 2, SignStyle.EXCEEDS_PAD, 2, 5}, {"+50", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+500", 1, 2, SignStyle.EXCEEDS_PAD, 4, 500}, {"+AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, }; }
Example 12
Source File: TestNumberParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseSignsStrict") Object[][] provider_parseSignsStrict() { return new Object[][] { // basics {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"1", 1, 2, SignStyle.NEVER, 1, 1}, {"2", 1, 2, SignStyle.NEVER, 1, 2}, {"3", 1, 2, SignStyle.NEVER, 1, 3}, {"4", 1, 2, SignStyle.NEVER, 1, 4}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"6", 1, 2, SignStyle.NEVER, 1, 6}, {"7", 1, 2, SignStyle.NEVER, 1, 7}, {"8", 1, 2, SignStyle.NEVER, 1, 8}, {"9", 1, 2, SignStyle.NEVER, 1, 9}, {"10", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 3, SignStyle.NEVER, 3, 100}, // never {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"50", 1, 2, SignStyle.NEVER, 2, 50}, {"500", 1, 2, SignStyle.NEVER, 2, 50}, {"-0", 1, 2, SignStyle.NEVER, 0, null}, {"-5", 1, 2, SignStyle.NEVER, 0, null}, {"-50", 1, 2, SignStyle.NEVER, 0, null}, {"-500", 1, 2, SignStyle.NEVER, 0, null}, {"-AAA", 1, 2, SignStyle.NEVER, 0, null}, {"+0", 1, 2, SignStyle.NEVER, 0, null}, {"+5", 1, 2, SignStyle.NEVER, 0, null}, {"+50", 1, 2, SignStyle.NEVER, 0, null}, {"+500", 1, 2, SignStyle.NEVER, 0, null}, {"+AAA", 1, 2, SignStyle.NEVER, 0, null}, // not negative {"0", 1, 2, SignStyle.NOT_NEGATIVE, 1, 0}, {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"50", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"500", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"-0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, // normal {"0", 1, 2, SignStyle.NORMAL, 1, 0}, {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"50", 1, 2, SignStyle.NORMAL, 2, 50}, {"500", 1, 2, SignStyle.NORMAL, 2, 50}, {"-0", 1, 2, SignStyle.NORMAL, 0, null}, {"-5", 1, 2, SignStyle.NORMAL, 2, -5}, {"-50", 1, 2, SignStyle.NORMAL, 3, -50}, {"-500", 1, 2, SignStyle.NORMAL, 3, -50}, {"-AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"+0", 1, 2, SignStyle.NORMAL, 0, null}, {"+5", 1, 2, SignStyle.NORMAL, 0, null}, {"+50", 1, 2, SignStyle.NORMAL, 0, null}, {"+500", 1, 2, SignStyle.NORMAL, 0, null}, {"+AAA", 1, 2, SignStyle.NORMAL, 0, null}, // always {"0", 1, 2, SignStyle.ALWAYS, 0, null}, {"5", 1, 2, SignStyle.ALWAYS, 0, null}, {"50", 1, 2, SignStyle.ALWAYS, 0, null}, {"500", 1, 2, SignStyle.ALWAYS, 0, null}, {"-0", 1, 2, SignStyle.ALWAYS, 0, null}, {"-5", 1, 2, SignStyle.ALWAYS, 2, -5}, {"-50", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-500", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-AAA", 1, 2, SignStyle.ALWAYS, 1, null}, {"+0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"+5", 1, 2, SignStyle.ALWAYS, 2, 5}, {"+50", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+500", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+AAA", 1, 2, SignStyle.ALWAYS, 1, null}, // exceeds pad {"0", 1, 2, SignStyle.EXCEEDS_PAD, 1, 0}, {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"50", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"500", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-5", 1, 2, SignStyle.EXCEEDS_PAD, 2, -5}, {"-50", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-500", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, {"+0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+5", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+50", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+500", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, }; }
Example 13
Source File: TestNumberParser.java From hottub with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseDigitsLenient") Object[][] provider_parseDigitsLenient() { return new Object[][] { // never {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"5", 2, 2, SignStyle.NEVER, 1, 5}, {"54", 1, 3, SignStyle.NEVER, 2, 54}, {"54", 2, 3, SignStyle.NEVER, 2, 54}, {"54", 3, 3, SignStyle.NEVER, 2, 54}, {"543", 1, 3, SignStyle.NEVER, 3, 543}, {"543", 2, 3, SignStyle.NEVER, 3, 543}, {"543", 3, 3, SignStyle.NEVER, 3, 543}, {"5432", 1, 3, SignStyle.NEVER, 4, 5432}, {"5432", 2, 3, SignStyle.NEVER, 4, 5432}, {"5432", 3, 3, SignStyle.NEVER, 4, 5432}, {"5AAA", 2, 3, SignStyle.NEVER, 1, 5}, // not negative {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"5", 2, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"54", 1, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 2, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 3, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"543", 1, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 2, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 3, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"5432", 1, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 2, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 3, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5AAA", 2, 3, SignStyle.NOT_NEGATIVE, 1, 5}, // normal {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"5", 2, 2, SignStyle.NORMAL, 1, 5}, {"54", 1, 3, SignStyle.NORMAL, 2, 54}, {"54", 2, 3, SignStyle.NORMAL, 2, 54}, {"54", 3, 3, SignStyle.NORMAL, 2, 54}, {"543", 1, 3, SignStyle.NORMAL, 3, 543}, {"543", 2, 3, SignStyle.NORMAL, 3, 543}, {"543", 3, 3, SignStyle.NORMAL, 3, 543}, {"5432", 1, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 2, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 3, 3, SignStyle.NORMAL, 4, 5432}, {"5AAA", 2, 3, SignStyle.NORMAL, 1, 5}, // always {"5", 1, 2, SignStyle.ALWAYS, 1, 5}, {"5", 2, 2, SignStyle.ALWAYS, 1, 5}, {"54", 1, 3, SignStyle.ALWAYS, 2, 54}, {"54", 2, 3, SignStyle.ALWAYS, 2, 54}, {"54", 3, 3, SignStyle.ALWAYS, 2, 54}, {"543", 1, 3, SignStyle.ALWAYS, 3, 543}, {"543", 2, 3, SignStyle.ALWAYS, 3, 543}, {"543", 3, 3, SignStyle.ALWAYS, 3, 543}, {"5432", 1, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 2, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 3, 3, SignStyle.ALWAYS, 4, 5432}, {"5AAA", 2, 3, SignStyle.ALWAYS, 1, 5}, // exceeds pad {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"5", 2, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"54", 1, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 2, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 3, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"543", 1, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 2, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 3, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"5432", 1, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 2, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 3, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5AAA", 2, 3, SignStyle.EXCEEDS_PAD, 1, 5}, }; }
Example 14
Source File: TestNumberParser.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseSignsStrict") Object[][] provider_parseSignsStrict() { return new Object[][] { // basics {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"1", 1, 2, SignStyle.NEVER, 1, 1}, {"2", 1, 2, SignStyle.NEVER, 1, 2}, {"3", 1, 2, SignStyle.NEVER, 1, 3}, {"4", 1, 2, SignStyle.NEVER, 1, 4}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"6", 1, 2, SignStyle.NEVER, 1, 6}, {"7", 1, 2, SignStyle.NEVER, 1, 7}, {"8", 1, 2, SignStyle.NEVER, 1, 8}, {"9", 1, 2, SignStyle.NEVER, 1, 9}, {"10", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 3, SignStyle.NEVER, 3, 100}, // never {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"50", 1, 2, SignStyle.NEVER, 2, 50}, {"500", 1, 2, SignStyle.NEVER, 2, 50}, {"-0", 1, 2, SignStyle.NEVER, 0, null}, {"-5", 1, 2, SignStyle.NEVER, 0, null}, {"-50", 1, 2, SignStyle.NEVER, 0, null}, {"-500", 1, 2, SignStyle.NEVER, 0, null}, {"-AAA", 1, 2, SignStyle.NEVER, 0, null}, {"+0", 1, 2, SignStyle.NEVER, 0, null}, {"+5", 1, 2, SignStyle.NEVER, 0, null}, {"+50", 1, 2, SignStyle.NEVER, 0, null}, {"+500", 1, 2, SignStyle.NEVER, 0, null}, {"+AAA", 1, 2, SignStyle.NEVER, 0, null}, // not negative {"0", 1, 2, SignStyle.NOT_NEGATIVE, 1, 0}, {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"50", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"500", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"-0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, // normal {"0", 1, 2, SignStyle.NORMAL, 1, 0}, {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"50", 1, 2, SignStyle.NORMAL, 2, 50}, {"500", 1, 2, SignStyle.NORMAL, 2, 50}, {"-0", 1, 2, SignStyle.NORMAL, 0, null}, {"-5", 1, 2, SignStyle.NORMAL, 2, -5}, {"-50", 1, 2, SignStyle.NORMAL, 3, -50}, {"-500", 1, 2, SignStyle.NORMAL, 3, -50}, {"-AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"+0", 1, 2, SignStyle.NORMAL, 0, null}, {"+5", 1, 2, SignStyle.NORMAL, 0, null}, {"+50", 1, 2, SignStyle.NORMAL, 0, null}, {"+500", 1, 2, SignStyle.NORMAL, 0, null}, {"+AAA", 1, 2, SignStyle.NORMAL, 0, null}, // always {"0", 1, 2, SignStyle.ALWAYS, 0, null}, {"5", 1, 2, SignStyle.ALWAYS, 0, null}, {"50", 1, 2, SignStyle.ALWAYS, 0, null}, {"500", 1, 2, SignStyle.ALWAYS, 0, null}, {"-0", 1, 2, SignStyle.ALWAYS, 0, null}, {"-5", 1, 2, SignStyle.ALWAYS, 2, -5}, {"-50", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-500", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-AAA", 1, 2, SignStyle.ALWAYS, 1, null}, {"+0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"+5", 1, 2, SignStyle.ALWAYS, 2, 5}, {"+50", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+500", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+AAA", 1, 2, SignStyle.ALWAYS, 1, null}, // exceeds pad {"0", 1, 2, SignStyle.EXCEEDS_PAD, 1, 0}, {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"50", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"500", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-5", 1, 2, SignStyle.EXCEEDS_PAD, 2, -5}, {"-50", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-500", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, {"+0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+5", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+50", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+500", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, }; }
Example 15
Source File: TestNumberParser.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseDigitsLenient") Object[][] provider_parseDigitsLenient() { return new Object[][] { // never {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"5", 2, 2, SignStyle.NEVER, 1, 5}, {"54", 1, 3, SignStyle.NEVER, 2, 54}, {"54", 2, 3, SignStyle.NEVER, 2, 54}, {"54", 3, 3, SignStyle.NEVER, 2, 54}, {"543", 1, 3, SignStyle.NEVER, 3, 543}, {"543", 2, 3, SignStyle.NEVER, 3, 543}, {"543", 3, 3, SignStyle.NEVER, 3, 543}, {"5432", 1, 3, SignStyle.NEVER, 4, 5432}, {"5432", 2, 3, SignStyle.NEVER, 4, 5432}, {"5432", 3, 3, SignStyle.NEVER, 4, 5432}, {"5AAA", 2, 3, SignStyle.NEVER, 1, 5}, // not negative {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"5", 2, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"54", 1, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 2, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 3, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"543", 1, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 2, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 3, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"5432", 1, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 2, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 3, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5AAA", 2, 3, SignStyle.NOT_NEGATIVE, 1, 5}, // normal {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"5", 2, 2, SignStyle.NORMAL, 1, 5}, {"54", 1, 3, SignStyle.NORMAL, 2, 54}, {"54", 2, 3, SignStyle.NORMAL, 2, 54}, {"54", 3, 3, SignStyle.NORMAL, 2, 54}, {"543", 1, 3, SignStyle.NORMAL, 3, 543}, {"543", 2, 3, SignStyle.NORMAL, 3, 543}, {"543", 3, 3, SignStyle.NORMAL, 3, 543}, {"5432", 1, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 2, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 3, 3, SignStyle.NORMAL, 4, 5432}, {"5AAA", 2, 3, SignStyle.NORMAL, 1, 5}, // always {"5", 1, 2, SignStyle.ALWAYS, 1, 5}, {"5", 2, 2, SignStyle.ALWAYS, 1, 5}, {"54", 1, 3, SignStyle.ALWAYS, 2, 54}, {"54", 2, 3, SignStyle.ALWAYS, 2, 54}, {"54", 3, 3, SignStyle.ALWAYS, 2, 54}, {"543", 1, 3, SignStyle.ALWAYS, 3, 543}, {"543", 2, 3, SignStyle.ALWAYS, 3, 543}, {"543", 3, 3, SignStyle.ALWAYS, 3, 543}, {"5432", 1, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 2, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 3, 3, SignStyle.ALWAYS, 4, 5432}, {"5AAA", 2, 3, SignStyle.ALWAYS, 1, 5}, // exceeds pad {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"5", 2, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"54", 1, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 2, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 3, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"543", 1, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 2, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 3, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"5432", 1, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 2, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 3, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5AAA", 2, 3, SignStyle.EXCEEDS_PAD, 1, 5}, }; }
Example 16
Source File: TestNumberParser.java From hottub with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseSignsLenient") Object[][] provider_parseSignsLenient() { return new Object[][] { // never {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"50", 1, 2, SignStyle.NEVER, 2, 50}, {"500", 1, 2, SignStyle.NEVER, 3, 500}, {"-0", 1, 2, SignStyle.NEVER, 2, 0}, {"-5", 1, 2, SignStyle.NEVER, 2, -5}, {"-50", 1, 2, SignStyle.NEVER, 3, -50}, {"-500", 1, 2, SignStyle.NEVER, 4, -500}, {"-AAA", 1, 2, SignStyle.NEVER, 1, null}, {"+0", 1, 2, SignStyle.NEVER, 2, 0}, {"+5", 1, 2, SignStyle.NEVER, 2, 5}, {"+50", 1, 2, SignStyle.NEVER, 3, 50}, {"+500", 1, 2, SignStyle.NEVER, 4, 500}, {"+AAA", 1, 2, SignStyle.NEVER, 1, null}, {"50", 2, 2, SignStyle.NEVER, 2, 50}, {"-50", 2, 2, SignStyle.NEVER, 0, null}, {"+50", 2, 2, SignStyle.NEVER, 0, null}, // not negative {"0", 1, 2, SignStyle.NOT_NEGATIVE, 1, 0}, {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"50", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"500", 1, 2, SignStyle.NOT_NEGATIVE, 3, 500}, {"-0", 1, 2, SignStyle.NOT_NEGATIVE, 2, 0}, {"-5", 1, 2, SignStyle.NOT_NEGATIVE, 2, -5}, {"-50", 1, 2, SignStyle.NOT_NEGATIVE, 3, -50}, {"-500", 1, 2, SignStyle.NOT_NEGATIVE, 4, -500}, {"-AAA", 1, 2, SignStyle.NOT_NEGATIVE, 1, null}, {"+0", 1, 2, SignStyle.NOT_NEGATIVE, 2, 0}, {"+5", 1, 2, SignStyle.NOT_NEGATIVE, 2, 5}, {"+50", 1, 2, SignStyle.NOT_NEGATIVE, 3, 50}, {"+500", 1, 2, SignStyle.NOT_NEGATIVE, 4, 500}, {"+AAA", 1, 2, SignStyle.NOT_NEGATIVE, 1, null}, {"50", 2, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"-50", 2, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+50", 2, 2, SignStyle.NOT_NEGATIVE, 0, null}, // normal {"0", 1, 2, SignStyle.NORMAL, 1, 0}, {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"50", 1, 2, SignStyle.NORMAL, 2, 50}, {"500", 1, 2, SignStyle.NORMAL, 3, 500}, {"-0", 1, 2, SignStyle.NORMAL, 2, 0}, {"-5", 1, 2, SignStyle.NORMAL, 2, -5}, {"-50", 1, 2, SignStyle.NORMAL, 3, -50}, {"-500", 1, 2, SignStyle.NORMAL, 4, -500}, {"-AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"+0", 1, 2, SignStyle.NORMAL, 2, 0}, {"+5", 1, 2, SignStyle.NORMAL, 2, 5}, {"+50", 1, 2, SignStyle.NORMAL, 3, 50}, {"+500", 1, 2, SignStyle.NORMAL, 4, 500}, {"+AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"50", 2, 2, SignStyle.NORMAL, 2, 50}, {"-50", 2, 2, SignStyle.NORMAL, 3, -50}, {"+50", 2, 2, SignStyle.NORMAL, 3, 50}, // always {"0", 1, 2, SignStyle.ALWAYS, 1, 0}, {"5", 1, 2, SignStyle.ALWAYS, 1, 5}, {"50", 1, 2, SignStyle.ALWAYS, 2, 50}, {"500", 1, 2, SignStyle.ALWAYS, 3, 500}, {"-0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"-5", 1, 2, SignStyle.ALWAYS, 2, -5}, {"-50", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-500", 1, 2, SignStyle.ALWAYS, 4, -500}, {"-AAA", 1, 2, SignStyle.ALWAYS, 1, null}, {"+0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"+5", 1, 2, SignStyle.ALWAYS, 2, 5}, {"+50", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+500", 1, 2, SignStyle.ALWAYS, 4, 500}, {"+AAA", 1, 2, SignStyle.ALWAYS, 1, null}, // exceeds pad {"0", 1, 2, SignStyle.EXCEEDS_PAD, 1, 0}, {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"50", 1, 2, SignStyle.EXCEEDS_PAD, 2, 50}, {"500", 1, 2, SignStyle.EXCEEDS_PAD, 3, 500}, {"-0", 1, 2, SignStyle.EXCEEDS_PAD, 2, 0}, {"-5", 1, 2, SignStyle.EXCEEDS_PAD, 2, -5}, {"-50", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-500", 1, 2, SignStyle.EXCEEDS_PAD, 4, -500}, {"-AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, {"+0", 1, 2, SignStyle.EXCEEDS_PAD, 2, 0}, {"+5", 1, 2, SignStyle.EXCEEDS_PAD, 2, 5}, {"+50", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+500", 1, 2, SignStyle.EXCEEDS_PAD, 4, 500}, {"+AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, }; }
Example 17
Source File: TestNumberParser.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseDigitsLenient") Object[][] provider_parseDigitsLenient() { return new Object[][] { // never {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"5", 2, 2, SignStyle.NEVER, 1, 5}, {"54", 1, 3, SignStyle.NEVER, 2, 54}, {"54", 2, 3, SignStyle.NEVER, 2, 54}, {"54", 3, 3, SignStyle.NEVER, 2, 54}, {"543", 1, 3, SignStyle.NEVER, 3, 543}, {"543", 2, 3, SignStyle.NEVER, 3, 543}, {"543", 3, 3, SignStyle.NEVER, 3, 543}, {"5432", 1, 3, SignStyle.NEVER, 4, 5432}, {"5432", 2, 3, SignStyle.NEVER, 4, 5432}, {"5432", 3, 3, SignStyle.NEVER, 4, 5432}, {"5AAA", 2, 3, SignStyle.NEVER, 1, 5}, // not negative {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"5", 2, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"54", 1, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 2, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 3, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"543", 1, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 2, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 3, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"5432", 1, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 2, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 3, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5AAA", 2, 3, SignStyle.NOT_NEGATIVE, 1, 5}, // normal {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"5", 2, 2, SignStyle.NORMAL, 1, 5}, {"54", 1, 3, SignStyle.NORMAL, 2, 54}, {"54", 2, 3, SignStyle.NORMAL, 2, 54}, {"54", 3, 3, SignStyle.NORMAL, 2, 54}, {"543", 1, 3, SignStyle.NORMAL, 3, 543}, {"543", 2, 3, SignStyle.NORMAL, 3, 543}, {"543", 3, 3, SignStyle.NORMAL, 3, 543}, {"5432", 1, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 2, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 3, 3, SignStyle.NORMAL, 4, 5432}, {"5AAA", 2, 3, SignStyle.NORMAL, 1, 5}, // always {"5", 1, 2, SignStyle.ALWAYS, 1, 5}, {"5", 2, 2, SignStyle.ALWAYS, 1, 5}, {"54", 1, 3, SignStyle.ALWAYS, 2, 54}, {"54", 2, 3, SignStyle.ALWAYS, 2, 54}, {"54", 3, 3, SignStyle.ALWAYS, 2, 54}, {"543", 1, 3, SignStyle.ALWAYS, 3, 543}, {"543", 2, 3, SignStyle.ALWAYS, 3, 543}, {"543", 3, 3, SignStyle.ALWAYS, 3, 543}, {"5432", 1, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 2, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 3, 3, SignStyle.ALWAYS, 4, 5432}, {"5AAA", 2, 3, SignStyle.ALWAYS, 1, 5}, // exceeds pad {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"5", 2, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"54", 1, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 2, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 3, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"543", 1, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 2, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 3, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"5432", 1, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 2, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 3, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5AAA", 2, 3, SignStyle.EXCEEDS_PAD, 1, 5}, }; }
Example 18
Source File: TestNumberParser.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseDigitsLenient") Object[][] provider_parseDigitsLenient() { return new Object[][] { // never {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"5", 2, 2, SignStyle.NEVER, 1, 5}, {"54", 1, 3, SignStyle.NEVER, 2, 54}, {"54", 2, 3, SignStyle.NEVER, 2, 54}, {"54", 3, 3, SignStyle.NEVER, 2, 54}, {"543", 1, 3, SignStyle.NEVER, 3, 543}, {"543", 2, 3, SignStyle.NEVER, 3, 543}, {"543", 3, 3, SignStyle.NEVER, 3, 543}, {"5432", 1, 3, SignStyle.NEVER, 4, 5432}, {"5432", 2, 3, SignStyle.NEVER, 4, 5432}, {"5432", 3, 3, SignStyle.NEVER, 4, 5432}, {"5AAA", 2, 3, SignStyle.NEVER, 1, 5}, // not negative {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"5", 2, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"54", 1, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 2, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 3, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"543", 1, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 2, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 3, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"5432", 1, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 2, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 3, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5AAA", 2, 3, SignStyle.NOT_NEGATIVE, 1, 5}, // normal {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"5", 2, 2, SignStyle.NORMAL, 1, 5}, {"54", 1, 3, SignStyle.NORMAL, 2, 54}, {"54", 2, 3, SignStyle.NORMAL, 2, 54}, {"54", 3, 3, SignStyle.NORMAL, 2, 54}, {"543", 1, 3, SignStyle.NORMAL, 3, 543}, {"543", 2, 3, SignStyle.NORMAL, 3, 543}, {"543", 3, 3, SignStyle.NORMAL, 3, 543}, {"5432", 1, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 2, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 3, 3, SignStyle.NORMAL, 4, 5432}, {"5AAA", 2, 3, SignStyle.NORMAL, 1, 5}, // always {"5", 1, 2, SignStyle.ALWAYS, 1, 5}, {"5", 2, 2, SignStyle.ALWAYS, 1, 5}, {"54", 1, 3, SignStyle.ALWAYS, 2, 54}, {"54", 2, 3, SignStyle.ALWAYS, 2, 54}, {"54", 3, 3, SignStyle.ALWAYS, 2, 54}, {"543", 1, 3, SignStyle.ALWAYS, 3, 543}, {"543", 2, 3, SignStyle.ALWAYS, 3, 543}, {"543", 3, 3, SignStyle.ALWAYS, 3, 543}, {"5432", 1, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 2, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 3, 3, SignStyle.ALWAYS, 4, 5432}, {"5AAA", 2, 3, SignStyle.ALWAYS, 1, 5}, // exceeds pad {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"5", 2, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"54", 1, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 2, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 3, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"543", 1, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 2, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 3, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"5432", 1, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 2, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 3, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5AAA", 2, 3, SignStyle.EXCEEDS_PAD, 1, 5}, }; }
Example 19
Source File: TestNumberParser.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseDigitsLenient") Object[][] provider_parseDigitsLenient() { return new Object[][] { // never {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"5", 2, 2, SignStyle.NEVER, 1, 5}, {"54", 1, 3, SignStyle.NEVER, 2, 54}, {"54", 2, 3, SignStyle.NEVER, 2, 54}, {"54", 3, 3, SignStyle.NEVER, 2, 54}, {"543", 1, 3, SignStyle.NEVER, 3, 543}, {"543", 2, 3, SignStyle.NEVER, 3, 543}, {"543", 3, 3, SignStyle.NEVER, 3, 543}, {"5432", 1, 3, SignStyle.NEVER, 4, 5432}, {"5432", 2, 3, SignStyle.NEVER, 4, 5432}, {"5432", 3, 3, SignStyle.NEVER, 4, 5432}, {"5AAA", 2, 3, SignStyle.NEVER, 1, 5}, // not negative {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"5", 2, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"54", 1, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 2, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"54", 3, 3, SignStyle.NOT_NEGATIVE, 2, 54}, {"543", 1, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 2, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"543", 3, 3, SignStyle.NOT_NEGATIVE, 3, 543}, {"5432", 1, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 2, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5432", 3, 3, SignStyle.NOT_NEGATIVE, 4, 5432}, {"5AAA", 2, 3, SignStyle.NOT_NEGATIVE, 1, 5}, // normal {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"5", 2, 2, SignStyle.NORMAL, 1, 5}, {"54", 1, 3, SignStyle.NORMAL, 2, 54}, {"54", 2, 3, SignStyle.NORMAL, 2, 54}, {"54", 3, 3, SignStyle.NORMAL, 2, 54}, {"543", 1, 3, SignStyle.NORMAL, 3, 543}, {"543", 2, 3, SignStyle.NORMAL, 3, 543}, {"543", 3, 3, SignStyle.NORMAL, 3, 543}, {"5432", 1, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 2, 3, SignStyle.NORMAL, 4, 5432}, {"5432", 3, 3, SignStyle.NORMAL, 4, 5432}, {"5AAA", 2, 3, SignStyle.NORMAL, 1, 5}, // always {"5", 1, 2, SignStyle.ALWAYS, 1, 5}, {"5", 2, 2, SignStyle.ALWAYS, 1, 5}, {"54", 1, 3, SignStyle.ALWAYS, 2, 54}, {"54", 2, 3, SignStyle.ALWAYS, 2, 54}, {"54", 3, 3, SignStyle.ALWAYS, 2, 54}, {"543", 1, 3, SignStyle.ALWAYS, 3, 543}, {"543", 2, 3, SignStyle.ALWAYS, 3, 543}, {"543", 3, 3, SignStyle.ALWAYS, 3, 543}, {"5432", 1, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 2, 3, SignStyle.ALWAYS, 4, 5432}, {"5432", 3, 3, SignStyle.ALWAYS, 4, 5432}, {"5AAA", 2, 3, SignStyle.ALWAYS, 1, 5}, // exceeds pad {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"5", 2, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"54", 1, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 2, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"54", 3, 3, SignStyle.EXCEEDS_PAD, 2, 54}, {"543", 1, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 2, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"543", 3, 3, SignStyle.EXCEEDS_PAD, 3, 543}, {"5432", 1, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 2, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5432", 3, 3, SignStyle.EXCEEDS_PAD, 4, 5432}, {"5AAA", 2, 3, SignStyle.EXCEEDS_PAD, 1, 5}, }; }
Example 20
Source File: TestNumberParser.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@DataProvider(name="parseSignsStrict") Object[][] provider_parseSignsStrict() { return new Object[][] { // basics {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"1", 1, 2, SignStyle.NEVER, 1, 1}, {"2", 1, 2, SignStyle.NEVER, 1, 2}, {"3", 1, 2, SignStyle.NEVER, 1, 3}, {"4", 1, 2, SignStyle.NEVER, 1, 4}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"6", 1, 2, SignStyle.NEVER, 1, 6}, {"7", 1, 2, SignStyle.NEVER, 1, 7}, {"8", 1, 2, SignStyle.NEVER, 1, 8}, {"9", 1, 2, SignStyle.NEVER, 1, 9}, {"10", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 2, SignStyle.NEVER, 2, 10}, {"100", 1, 3, SignStyle.NEVER, 3, 100}, // never {"0", 1, 2, SignStyle.NEVER, 1, 0}, {"5", 1, 2, SignStyle.NEVER, 1, 5}, {"50", 1, 2, SignStyle.NEVER, 2, 50}, {"500", 1, 2, SignStyle.NEVER, 2, 50}, {"-0", 1, 2, SignStyle.NEVER, 0, null}, {"-5", 1, 2, SignStyle.NEVER, 0, null}, {"-50", 1, 2, SignStyle.NEVER, 0, null}, {"-500", 1, 2, SignStyle.NEVER, 0, null}, {"-AAA", 1, 2, SignStyle.NEVER, 0, null}, {"+0", 1, 2, SignStyle.NEVER, 0, null}, {"+5", 1, 2, SignStyle.NEVER, 0, null}, {"+50", 1, 2, SignStyle.NEVER, 0, null}, {"+500", 1, 2, SignStyle.NEVER, 0, null}, {"+AAA", 1, 2, SignStyle.NEVER, 0, null}, // not negative {"0", 1, 2, SignStyle.NOT_NEGATIVE, 1, 0}, {"5", 1, 2, SignStyle.NOT_NEGATIVE, 1, 5}, {"50", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"500", 1, 2, SignStyle.NOT_NEGATIVE, 2, 50}, {"-0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"-AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+0", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+5", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+50", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+500", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, {"+AAA", 1, 2, SignStyle.NOT_NEGATIVE, 0, null}, // normal {"0", 1, 2, SignStyle.NORMAL, 1, 0}, {"5", 1, 2, SignStyle.NORMAL, 1, 5}, {"50", 1, 2, SignStyle.NORMAL, 2, 50}, {"500", 1, 2, SignStyle.NORMAL, 2, 50}, {"-0", 1, 2, SignStyle.NORMAL, 0, null}, {"-5", 1, 2, SignStyle.NORMAL, 2, -5}, {"-50", 1, 2, SignStyle.NORMAL, 3, -50}, {"-500", 1, 2, SignStyle.NORMAL, 3, -50}, {"-AAA", 1, 2, SignStyle.NORMAL, 1, null}, {"+0", 1, 2, SignStyle.NORMAL, 0, null}, {"+5", 1, 2, SignStyle.NORMAL, 0, null}, {"+50", 1, 2, SignStyle.NORMAL, 0, null}, {"+500", 1, 2, SignStyle.NORMAL, 0, null}, {"+AAA", 1, 2, SignStyle.NORMAL, 0, null}, // always {"0", 1, 2, SignStyle.ALWAYS, 0, null}, {"5", 1, 2, SignStyle.ALWAYS, 0, null}, {"50", 1, 2, SignStyle.ALWAYS, 0, null}, {"500", 1, 2, SignStyle.ALWAYS, 0, null}, {"-0", 1, 2, SignStyle.ALWAYS, 0, null}, {"-5", 1, 2, SignStyle.ALWAYS, 2, -5}, {"-50", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-500", 1, 2, SignStyle.ALWAYS, 3, -50}, {"-AAA", 1, 2, SignStyle.ALWAYS, 1, null}, {"+0", 1, 2, SignStyle.ALWAYS, 2, 0}, {"+5", 1, 2, SignStyle.ALWAYS, 2, 5}, {"+50", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+500", 1, 2, SignStyle.ALWAYS, 3, 50}, {"+AAA", 1, 2, SignStyle.ALWAYS, 1, null}, // exceeds pad {"0", 1, 2, SignStyle.EXCEEDS_PAD, 1, 0}, {"5", 1, 2, SignStyle.EXCEEDS_PAD, 1, 5}, {"50", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"500", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"-5", 1, 2, SignStyle.EXCEEDS_PAD, 2, -5}, {"-50", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-500", 1, 2, SignStyle.EXCEEDS_PAD, 3, -50}, {"-AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, {"+0", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+5", 1, 2, SignStyle.EXCEEDS_PAD, 0, null}, {"+50", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+500", 1, 2, SignStyle.EXCEEDS_PAD, 3, 50}, {"+AAA", 1, 2, SignStyle.EXCEEDS_PAD, 1, null}, }; }