Home
last modified time | relevance | path

Searched defs:expected (Results 1 – 25 of 234) sorted by relevance

12345678910

/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestChronoUnit.java108 public void test_yearsBetween(LocalDate start, LocalDate end, long expected) { in test_yearsBetween()
109 assertEquals(YEARS.between(start, end), expected); in test_yearsBetween() local
113 public void test_yearsBetweenReversed(LocalDate start, LocalDate end, long expected) { in test_yearsBetweenReversed()
118 …ublic void test_yearsBetween_LocalDateTimeSameTime(LocalDate start, LocalDate end, long expected) { in test_yearsBetween_LocalDateTimeSameTime()
123 …blic void test_yearsBetween_LocalDateTimeLaterTime(LocalDate start, LocalDate end, long expected) { in test_yearsBetween_LocalDateTimeLaterTime()
132 … public void test_yearsBetween_ZonedDateSameOffset(LocalDate start, LocalDate end, long expected) { in test_yearsBetween_ZonedDateSameOffset()
137 …public void test_yearsBetween_ZonedDateLaterOffset(LocalDate start, LocalDate end, long expected) { in test_yearsBetween_ZonedDateLaterOffset()
181 public void test_monthsBetween(LocalDate start, LocalDate end, long expected) { in test_monthsBetween()
182 assertEquals(MONTHS.between(start, end), expected); in test_monthsBetween() local
186 public void test_monthsBetweenReversed(LocalDate start, LocalDate end, long expected) { in test_monthsBetweenReversed()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DCalendarBuilderTest.java38 GregorianCalendar expected = new GregorianCalendar(); in test_default_values() local
48 GregorianCalendar expected = new GregorianCalendar(); in test_setCalendarType_iso8601() local
87 GregorianCalendar expected = new GregorianCalendar(); in test_setDate() local
96 GregorianCalendar expected = new GregorianCalendar(); in test_setTimeOfDay() local
110 GregorianCalendar expected = new GregorianCalendar(); in test_setWeekDate() local
126 GregorianCalendar expected = new GregorianCalendar(); in test_setLenient() local
137 GregorianCalendar expected = new GregorianCalendar(Locale.GERMANY); in test_setLocale() local
148 GregorianCalendar expected = new GregorianCalendar(th); in test_setLocale_thTH() local
157 GregorianCalendar expected = new GregorianCalendar(); in test_set() local
187 GregorianCalendar expected = new GregorianCalendar(); in test_setFields() local
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKInstantPrinterParser.java111 public void test_print_grouped(long instantSecs, int nano, String expected) { in test_print_grouped()
114 assertEquals(f.format(instant), expected); in test_print_grouped() local
189 … public void test_print_digits(int fractionalDigits, long instantSecs, int nano, String expected) { in test_print_digits()
192 assertEquals(f.format(instant), expected); in test_print_digits() local
226 Instant expected = Instant.ofEpochSecond(instantSecs, nano); in test_parse_digitsMinusOne() local
228 assertEquals(f.parse(input, Instant::from), expected); in test_parse_digitsMinusOne() local
237 Instant expected = Instant.ofEpochSecond(instantSecs, nano); in test_parse_digitsNine() local
238 assertEquals(f.parse(input, Instant::from), expected); in test_parse_digitsNine() local
253 Instant expected = OffsetDateTime.of(1970, 2, 4, 0, 0, 0, 0, ZoneOffset.UTC).toInstant(); in test_parse_endOfDay() local
257 assertEquals(parsed.query(Instant::from), expected); in test_parse_endOfDay() local
[all …]
DTCKZoneIdPrinterParser.java115 public void test_print(LocalDateTime ldt, ZoneId zone, String expected) { in test_print()
123 public void test_print_pattern_VV(LocalDateTime ldt, ZoneId zone, String expected) { in test_print_pattern_VV()
211 … test_parseSuccess_plain(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected) { in test_parseSuccess_plain()
217 …assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + text… in test_parseSuccess_plain() local
219 … assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + text); in test_parseSuccess_plain() local
226 …test_parseSuccess_prefix(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected) { in test_parseSuccess_prefix()
234 …assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + pref… in test_parseSuccess_prefix() local
236 …assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + prefixTe… in test_parseSuccess_prefix() local
243 …test_parseSuccess_suffix(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected) { in test_parseSuccess_suffix()
250 …assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + suff… in test_parseSuccess_suffix() local
[all …]
DTCKOffsetPrinterParser.java234 …est_print(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, String expected) { in test_print()
243 …pattern_X(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, String expected) { in test_print_pattern_X()
265 …pattern_x(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, String expected) { in test_print_pattern_x()
293 …pattern_Z(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, String expected) { in test_print_pattern_Z()
317 …void test_print_localized(TextStyle style, LocalDateTime ldt, ZoneOffset offset, String expected) { in test_print_localized()
323 assertEquals(f.format(odt), expected); in test_print_localized() local
324 assertEquals(f.format(zdt), expected); in test_print_localized() local
330 assertEquals(f.format(odt), expected); in test_print_localized() local
331 assertEquals(f.format(zdt), expected); in test_print_localized() local
336 assertEquals(f.format(odt), expected); in test_print_localized() local
[all …]
DTCKChronoPrinterParser.java121 public void test_parseValid_caseSensitive(String text, Chronology expected) { in test_parseValid_caseSensitive()
126 assertEquals(parsed.query(TemporalQueries.chronology()), expected); in test_parseValid_caseSensitive() local
130 public void test_parseValid_caseSensitive_lowercaseRejected(String text, Chronology expected) { in test_parseValid_caseSensitive_lowercaseRejected()
139 public void test_parseValid_caseInsensitive(String text, Chronology expected) { in test_parseValid_caseInsensitive()
144 assertEquals(parsed.query(TemporalQueries.chronology()), expected); in test_parseValid_caseInsensitive() local
DTCKDateTimeFormatters.java228 String expected, Class<?> expectedEx) { in test_print_isoLocalDate()
231 assertEquals(DateTimeFormatter.ISO_LOCAL_DATE.format(test), expected); in test_print_isoLocalDate() local
247 Expected expected = createDate(year, month, day); in test_parse_isoLocalDate() local
249 …arseMatch(DateTimeFormatter.ISO_LOCAL_DATE.parseUnresolved(input, new ParsePosition(0)), expected); in test_parse_isoLocalDate() local
255 Expected expected = createDate(999999999, 8, 6); in test_parse_isoLocalDate_999999999() local
262 Expected expected = createDate(1000000000, 8, 6); in test_parse_isoLocalDate_1000000000() local
273 Expected expected = createDate(-999999999, 8, 6); in test_parse_isoLocalDate_M999999999() local
280 Expected expected = createDate(-1000000000, 8, 6); in test_parse_isoLocalDate_M1000000000() local
322 String expected, Class<?> expectedEx) { in test_print_isoOffsetDate()
325 assertEquals(DateTimeFormatter.ISO_OFFSET_DATE.format(test), expected); in test_print_isoOffsetDate() local
[all …]
/libcore/luni/src/test/java/libcore/java/util/zip/
DOldAndroidChecksumTest.java40 private void adler32Test(byte[] values, long expected) { in adler32Test()
45 assertEquals(adler.getValue(), expected); in adler32Test() local
52 assertEquals(adler.getValue(), expected); in adler32Test() local
55 private void cRC32Test(byte[] values, long expected) { in cRC32Test()
60 assertEquals(crc.getValue(), expected); in cRC32Test() local
67 assertEquals(crc.getValue(), expected); in cRC32Test() local
/libcore/luni/src/test/java/libcore/java/lang/
DMathTest.java47 long expected = (long) a + (long) b; in testAddExactI() local
58 long expected = (long) a - (long) b; in testSubtractExactI() local
70 long expected = (long) a * (long) b; in testMultiplyExactI() local
81 long expected = (long) a + 1L; in testIncrementExactI() local
92 long expected = (long) a - 1L; in testDecrementExactI() local
103 long expected = -((long) a); in testNegateExactI() local
136 BigInteger expected = BigInteger.valueOf(a).add(BigInteger.valueOf(b)); in testAddExactL() local
147 BigInteger expected = BigInteger.valueOf(a).subtract(BigInteger.valueOf(b)); in testSubtractExactL() local
158 BigInteger expected = BigInteger.valueOf(a).multiply(BigInteger.valueOf(b)); in testMultiplyExactL() local
169 BigInteger expected = BigInteger.valueOf(a).add(BigInteger.ONE); in testIncrementExactL() local
[all …]
DStrictMathTest.java44 long expected = (long) a + (long) b; in testAddExactI() local
55 long expected = (long) a - (long) b; in testSubtractExactI() local
67 long expected = (long) a * (long) b; in testMultiplyExactI() local
97 BigInteger expected = BigInteger.valueOf(a).add(BigInteger.valueOf(b)); in testAddExactL() local
108 BigInteger expected = BigInteger.valueOf(a).subtract(BigInteger.valueOf(b)); in testSubtractExactL() local
119 BigInteger expected = BigInteger.valueOf(a).multiply(BigInteger.valueOf(b)); in testMultiplyExactL() local
159 int expected = a / b; in testFloorDivI() local
174 int expected = a % b; in testFloorModI() local
205 long expected = a / b; in testFloorDivL() local
220 long expected = a % b; in testFloorModL() local
/libcore/dom/src/test/java/org/w3c/domts/
DDOMTestInnerClass.java53 public void assertSame(String assertID, Object expected, Object actual) { in assertSame()
75 public void assertEqualsIgnoreCase(String assertID, String expected, in assertEqualsIgnoreCase()
80 public void assertEqualsIgnoreCase(String assertID, Collection expected, in assertEqualsIgnoreCase()
85 public void assertEqualsIgnoreCase(String assertID, List expected, in assertEqualsIgnoreCase()
90 public void assertEquals(String assertID, String expected, String actual) { in assertEquals()
94 public void assertEquals(String assertID, int expected, int actual) { in assertEquals()
98 public void assertEquals(String assertID, double expected, double actual) { in assertEquals()
102 public void assertEquals(String assertID, boolean expected, boolean actual) { in assertEquals()
106 public void assertEquals(String assertID, Collection expected, in assertEquals()
111 public void assertEquals(String assertID, Collection expected, in assertEquals()
[all …]
DDOMTestCase.java213 public void assertSame(String assertID, Object expected, Object actual) { in assertSame()
294 String expected, in assertEqualsIgnoreCase()
312 Collection expected, in assertEqualsIgnoreCase()
330 List expected, in assertEqualsIgnoreCase()
348 String expected, in assertEqualsAutoCase()
377 private List toUpperCase(Collection expected) { in toUpperCase()
400 Collection expected, in assertEqualAutoCase()
431 List expected, in assertEqualsAutoCase()
458 public void assertEquals(String assertID, String expected, String actual) { in assertEquals()
472 public void assertEquals(String assertID, int expected, int actual) { in assertEquals()
[all …]
DDOMTestFramework.java47 Object expected, in assertSame()
77 String expected, in assertEqualsIgnoreCase()
83 Collection expected, in assertEqualsIgnoreCase()
89 List expected, in assertEqualsIgnoreCase()
95 String expected, in assertEquals()
101 int expected, in assertEquals()
107 boolean expected, in assertEquals()
113 double expected, in assertEquals()
119 Collection expected, in assertEquals()
125 String expected, in assertNotEqualsIgnoreCase()
[all …]
DJUnitTestCaseAdapter.java202 public void assertSame(DOMTestCase test, String assertID, Object expected, Object actual) { in assertSame()
238 …public void assertEqualsIgnoreCase(DOMTestCase test, String assertID, String expected, String actu… in assertEqualsIgnoreCase()
244 …public void assertEqualsIgnoreCase(DOMTestCase test, String assertID, Collection expected, Collect… in assertEqualsIgnoreCase()
272 …public void assertEqualsIgnoreCase(DOMTestCase test, String assertID, List expected, List actual) { in assertEqualsIgnoreCase()
292 public void assertEquals(DOMTestCase test, String assertID, String expected, String actual) { in assertEquals()
296 public void assertEquals(DOMTestCase test, String assertID, int expected, int actual) { in assertEquals()
300 public void assertEquals(DOMTestCase test, String assertID, boolean expected, boolean actual) { in assertEquals()
304 public void assertEquals(DOMTestCase test, String assertID, double expected, double actual) { in assertEquals()
308 …public void assertEquals(DOMTestCase test, String assertID, Collection expected, Collection actual… in assertEquals()
336 …public void assertNotEqualsIgnoreCase(DOMTestCase test, String assertID, String expected, String a… in assertNotEqualsIgnoreCase()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestTextPrinter.java247 …public void test_format(TemporalField field, TextStyle style, int value, String expected) throws E… in test_format()
249 assertEquals(buf.toString(), expected); in test_format() local
253 …public void test_formatDayOfWeek(Locale locale, String pattern, String expected, DayOfWeek dayOfWe… in test_formatDayOfWeek()
260 …t_formatJapaneseEra(TemporalField field, TextStyle style, int value, String expected) throws Excep… in test_formatJapaneseEra()
263 assertEquals(buf.toString(), expected); in test_formatJapaneseEra() local
267 …c void test_standaloneNames(Locale locale, TemporalField field, TextStyle style, String expected) { in test_standaloneNames()
269 assertEquals(buf.toString(), expected); in test_standaloneNames() local
DTestDateTimeParsing.java137 …oid test_parse_instantZones_ZDT(DateTimeFormatter formatter, String text, ZonedDateTime expected) { in test_parse_instantZones_ZDT()
139 assertEquals(ZonedDateTime.from(actual), expected); in test_parse_instantZones_ZDT() local
143 …oid test_parse_instantZones_LDT(DateTimeFormatter formatter, String text, ZonedDateTime expected) { in test_parse_instantZones_LDT()
149 …test_parse_instantZones_Instant(DateTimeFormatter formatter, String text, ZonedDateTime expected) { in test_parse_instantZones_Instant()
155 …st_parse_instantZones_supported(DateTimeFormatter formatter, String text, ZonedDateTime expected) { in test_parse_instantZones_supported()
176 …lic void test_parse_instantNoZone_ZDT(DateTimeFormatter formatter, String text, Instant expected) { in test_parse_instantNoZone_ZDT()
182 …lic void test_parse_instantNoZone_LDT(DateTimeFormatter formatter, String text, Instant expected) { in test_parse_instantNoZone_LDT()
188 …void test_parse_instantNoZone_Instant(DateTimeFormatter formatter, String text, Instant expected) { in test_parse_instantNoZone_Instant()
190 assertEquals(Instant.from(actual), expected); in test_parse_instantNoZone_Instant() local
194 …id test_parse_instantNoZone_supported(DateTimeFormatter formatter, String text, Instant expected) { in test_parse_instantNoZone_supported()
DTestZoneOffsetPrinter.java151 public void test_format(String pattern, String expected, ZoneOffset offset) throws Exception { in test_format()
154 assertEquals(buf.toString(), "EXISTING" + expected); in test_format() local
158 public void test_toString(String pattern, String expected, ZoneOffset offset) throws Exception { in test_toString()
/libcore/luni/src/test/java/libcore/libcore/reflect/
DParameterizedTypeRegressionTest.java59 Class<List> expected = List.class; in testNoGeneric() local
69 ParameterizedTypeImpl expected = new ParameterizedTypeImpl( in testGeneric() local
83 ParameterizedTypeImpl expected = new ParameterizedTypeImpl( in testGenericOfGeneric() local
103 ParameterizedTypeImpl expected = new ParameterizedTypeImpl( in testNested1() local
119 ParameterizedTypeImpl expected = new ParameterizedTypeImpl( in testNested2() local
139 ParameterizedTypeImpl expected = new ParameterizedTypeImpl( in testNested3() local
163 ParameterizedTypeImpl expected = new ParameterizedTypeImpl( in testNested4_nonGenericLeaf() local
189 ParameterizedTypeImpl expected = new ParameterizedTypeImpl( in testNested4_nonGenericNonLeaf() local
/libcore/support/src/test/java/org/apache/harmony/testframework/
DCharSinkTester.java83 private static void assertArrayEquals(char[] expected, char[] actual) { in assertArrayEquals()
94 char[] expected = new char[] { }; in sinkTestNoWriting() local
102 char[] expected = new char[] { }; in sinkTestWriteZeroChars() local
115 char[] expected = "EFGCDECBA".toCharArray(); in sinkTestWriteCharByChar() local
127 char[] expected = "EFGCDECBA".toCharArray(); in sinkTestWriteArray() local
140 char[] expected = "EFGCDECBA".toCharArray(); in sinkTestWriteOffset() local
167 char[] expected = new char[(1024 * 1024) + 1]; // 2 MB + 1 char in sinkTestWriteLargeArray() local
/libcore/ojluni/src/test/java/time/test/java/util/
DTestFormatter.java158 String expected, Object dt) { in test()
184 String expected = test(fmtStr, locale, null, cal); in testDate() local
196 String expected = test(fmtStr, locale, null, cal); in testTime() local
207 private String toZoneIdStr(String expected) { in toZoneIdStr()
212 private String toZoneOffsetStr(String expected) { in toZoneOffsetStr()
223 String expected = toZoneIdStr(calOutput); in testZoneId() local
247 String expected = test(fmtStr, locale, null, cal); in testInstant() local
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKPeriod.java339 public void factory_parse(String text, Period expected) { in factory_parse()
345 public void factory_parse_plus(String text, Period expected) { in factory_parse_plus()
351 public void factory_parse_minus(String text, Period expected) { in factory_parse_minus()
366 public void factory_parse_lowerCase(String text, Period expected) { in factory_parse_lowerCase()
634 public void test_plus_TemporalAmount(Period base, Period add, Period expected) { in test_plus_TemporalAmount()
635 assertEquals(base.plus(add), expected); in test_plus_TemporalAmount() local
779 public void test_minus_TemporalAmount(Period base, Period subtract, Period expected) { in test_minus_TemporalAmount()
780 assertEquals(base.minus(subtract), expected); in test_minus_TemporalAmount() local
1060 public void test_addTo(Period period, LocalDate baseDate, LocalDate expected) { in test_addTo()
1061 assertEquals(period.addTo(baseDate), expected); in test_addTo() local
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/regex/
DSplitTest.java37 String[] expected = new String[] { "have", "you", "done", "it", "right" }; in testSimple() local
80 private void assertArraysEqual(String[] expected, String[] actual) { in assertArraysEqual()
83 assertEquals(Integer.toString(i), expected[i], actual[i]); in assertArraysEqual() local
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DStreamLinkTest.java77 int[] expected = data.stream().map(e -> e + n).toArray(); in testIntManyStreams() local
90 long[] expected = data.stream().map(e -> e + n).toArray(); in testLongManyStreams() local
103 double[] expected = data.stream().map(e -> accumulate(e, n)).toArray(); in testDoubleManyStreams() local
/libcore/support/src/test/java/libcore/javax/net/ssl/
DSSLConfigurationAsserts.java82 private static void assertSSLParametersEqual(SSLParameters expected, SSLParameters actual) { in assertSSLParametersEqual()
89 private static void assertCipherSuitesEqual(String[] expected, String[] actual) { in assertCipherSuitesEqual()
93 private static void assertProtocolsEqual(String[] expected, String[] actual) { in assertProtocolsEqual()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKIsoChronology.java346 …fEra(ResolverStyle style, Integer e, Integer yoe, Integer y, ChronoField field, Integer expected) { in test_resolve_yearOfEra()
434 …public void test_resolve_ymd_lenient(int y, int m, int d, LocalDate expected, Object smart, boolea… in test_resolve_ymd_lenient()
445 …public void test_resolve_ymd_smart(int y, int m, int d, LocalDate expected, Object smart, boolean … in test_resolve_ymd_smart()
468 …public void test_resolve_ymd_strict(int y, int m, int d, LocalDate expected, Object smart, boolean… in test_resolve_ymd_strict()
518 …public void test_resolve_yd_lenient(int y, int d, LocalDate expected, boolean smart, boolean stric… in test_resolve_yd_lenient()
528 …public void test_resolve_yd_smart(int y, int d, LocalDate expected, boolean smart, boolean strict)… in test_resolve_yd_smart()
547 …public void test_resolve_yd_strict(int y, int d, LocalDate expected, boolean smart, boolean strict… in test_resolve_yd_strict()
625 …public void test_resolve_ymaa_lenient(int y, int m, int w, int d, LocalDate expected, boolean smar… in test_resolve_ymaa_lenient()
637 …public void test_resolve_ymaa_smart(int y, int m, int w, int d, LocalDate expected, boolean smart,… in test_resolve_ymaa_smart()
658 …public void test_resolve_ymaa_strict(int y, int m, int w, int d, LocalDate expected, boolean smart… in test_resolve_ymaa_strict()

12345678910