/libcore/luni/src/test/java/libcore/java/util/ |
D | CalendarBuilderTest.java | 38 GregorianCalendar expected = new GregorianCalendar(); in test_default_values() local 39 expected.clear(); in test_default_values() 40 assertEquals(expected, builder.build()); in test_default_values() 48 GregorianCalendar expected = new GregorianCalendar(); in test_setCalendarType_iso8601() local 49 expected.clear(); in test_setCalendarType_iso8601() 50 expected.setGregorianChange(new Date(Long.MIN_VALUE)); in test_setCalendarType_iso8601() 51 expected.setFirstDayOfWeek(Calendar.MONDAY); in test_setCalendarType_iso8601() 52 expected.setMinimalDaysInFirstWeek(4); in test_setCalendarType_iso8601() 53 assertEquals(expected, builder.build()); in test_setCalendarType_iso8601() 62 } catch (NullPointerException expected) {} in test_setCalendarType_invalid() [all …]
|
D | LocaleLanguageRangeTest.java | 53 } catch (IllegalArgumentException expected) { in testConstructor_invalidWeight() 59 } catch (IllegalArgumentException expected) { in testConstructor_invalidWeight() 70 } catch (NullPointerException expected) { in testConstructor_nullRange() 75 } catch (NullPointerException expected) { in testConstructor_nullRange() 89 } catch (ArrayIndexOutOfBoundsException expected) { in testConstructor_checksForAtLeastOneSubtag() 94 } catch (ArrayIndexOutOfBoundsException expected) { in testConstructor_checksForAtLeastOneSubtag() 211 } catch (NullPointerException expected) { in testMapEquivalents_nullList() 230 List<LanguageRange> expected = Arrays.asList( in testMapEquivalents() local 239 assertEquals(expected, LanguageRange.parse(ranges, map)); in testMapEquivalents() 241 assertEquals(expected, LanguageRange.mapEquivalents(LanguageRange.parse(ranges), map)); in testMapEquivalents() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | ArrayTest.java | 46 try { Array.getBoolean(bytes, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean() 47 try { Array.getBoolean(chars, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean() 48 try { Array.getBoolean(doubles, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean() 49 try { Array.getBoolean(floats, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean() 50 try { Array.getBoolean(ints, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean() 51 try { Array.getBoolean(longs, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean() 52 try { Array.getBoolean(shorts, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean() 53 try { Array.getBoolean(null, 0); fail(); } catch (NullPointerException expected) {} in testGetBoolean() 57 try { Array.getByte(booleans, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetByte() 59 try { Array.getByte(chars, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetByte() [all …]
|
/libcore/dom/src/test/java/org/w3c/domts/ |
D | DOMTestInnerClass.java | 53 public void assertSame(String assertID, Object expected, Object actual) { in assertSame() argument 54 test.assertSame(assertID, expected, actual); in assertSame() 75 public void assertEqualsIgnoreCase(String assertID, String expected, in assertEqualsIgnoreCase() argument 77 test.assertEqualsIgnoreCase(assertID, expected, actual); in assertEqualsIgnoreCase() 80 public void assertEqualsIgnoreCase(String assertID, Collection expected, in assertEqualsIgnoreCase() argument 82 test.assertEqualsIgnoreCase(assertID, expected, actual); in assertEqualsIgnoreCase() 85 public void assertEqualsIgnoreCase(String assertID, List expected, in assertEqualsIgnoreCase() argument 87 test.assertEqualsIgnoreCase(assertID, expected, actual); in assertEqualsIgnoreCase() 90 public void assertEquals(String assertID, String expected, String actual) { in assertEquals() argument 91 test.assertEquals(assertID, expected, actual); in assertEquals() [all …]
|
D | DOMTestCase.java | 213 public void assertSame(String assertID, Object expected, Object actual) { in assertSame() argument 214 framework.assertSame(this, assertID, expected, actual); in assertSame() 294 String expected, in assertEqualsIgnoreCase() argument 296 framework.assertEqualsIgnoreCase(this, assertID, expected, actual); in assertEqualsIgnoreCase() 312 Collection expected, in assertEqualsIgnoreCase() argument 314 framework.assertEqualsIgnoreCase(this, assertID, expected, actual); in assertEqualsIgnoreCase() 330 List expected, in assertEqualsIgnoreCase() argument 332 framework.assertEqualsIgnoreCase(this, assertID, expected, actual); in assertEqualsIgnoreCase() 348 String expected, in assertEqualsAutoCase() argument 359 framework.assertEqualsIgnoreCase(this, assertID, expected, actual); in assertEqualsAutoCase() [all …]
|
D | JUnitTestCaseAdapter.java | 202 public void assertSame(DOMTestCase test, String assertID, Object expected, Object actual) { in assertSame() argument 203 boolean same = (expected == actual); in assertSame() 209 if(expected == null || actual == null || in assertSame() 210 !(expected instanceof Node) || !(actual instanceof Node)) { in assertSame() 211 assertEquals(assertID,expected,actual); in assertSame() 217 assertEquals(assertID,expected,actual); in assertSame() 238 …public void assertEqualsIgnoreCase(DOMTestCase test, String assertID, String expected, String actu… in assertEqualsIgnoreCase() argument 239 if (!expected.equalsIgnoreCase(actual)) { in assertEqualsIgnoreCase() 240 assertEquals(assertID,expected, actual); in assertEqualsIgnoreCase() 244 …public void assertEqualsIgnoreCase(DOMTestCase test, String assertID, Collection expected, Collect… in assertEqualsIgnoreCase() argument [all …]
|
D | DOMTestFramework.java | 47 Object expected, in assertSame() argument 77 String expected, in assertEqualsIgnoreCase() argument 83 Collection expected, in assertEqualsIgnoreCase() argument 89 List expected, in assertEqualsIgnoreCase() argument 95 String expected, in assertEquals() argument 101 int expected, in assertEquals() argument 107 boolean expected, in assertEquals() argument 113 double expected, in assertEquals() argument 119 Collection expected, in assertEquals() argument 125 String expected, in assertNotEqualsIgnoreCase() argument [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | MathTest.java | 47 long expected = (long) a + (long) b; in testAddExactI() local 49 assertEquals(expected, Math.addExact(a, b)); in testAddExactI() 51 if (expected == a + b) { in testAddExactI() 58 long expected = (long) a - (long) b; in testSubtractExactI() local 60 assertEquals(expected, Math.subtractExact(a, b)); in testSubtractExactI() 63 if (expected == a - b) { in testSubtractExactI() 70 long expected = (long) a * (long) b; in testMultiplyExactI() local 72 assertEquals(expected, Math.multiplyExact(a, b)); in testMultiplyExactI() 74 if (expected == a * b) { in testMultiplyExactI() 81 long expected = (long) a + 1L; in testIncrementExactI() local [all …]
|
D | StrictMathTest.java | 44 long expected = (long) a + (long) b; in testAddExactI() local 46 assertEquals(expected, StrictMath.addExact(a, b)); in testAddExactI() 48 if (expected == a + b) { in testAddExactI() 55 long expected = (long) a - (long) b; in testSubtractExactI() local 57 assertEquals(expected, StrictMath.subtractExact(a, b)); in testSubtractExactI() 60 if (expected == a - b) { in testSubtractExactI() 67 long expected = (long) a * (long) b; in testMultiplyExactI() local 69 assertEquals(expected, StrictMath.multiplyExact(a, b)); in testMultiplyExactI() 71 if (expected == a * b) { in testMultiplyExactI() 97 BigInteger expected = BigInteger.valueOf(a).add(BigInteger.valueOf(b)); in testAddExactL() local [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | TestChronoUnit.java | 108 public void test_yearsBetween(LocalDate start, LocalDate end, long expected) { in test_yearsBetween() argument 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() argument 114 assertEquals(YEARS.between(end, start), -expected); in test_yearsBetweenReversed() 118 …ublic void test_yearsBetween_LocalDateTimeSameTime(LocalDate start, LocalDate end, long expected) { in test_yearsBetween_LocalDateTimeSameTime() argument 119 assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 30)), expected); in test_yearsBetween_LocalDateTimeSameTime() 123 …blic void test_yearsBetween_LocalDateTimeLaterTime(LocalDate start, LocalDate end, long expected) { in test_yearsBetween_LocalDateTimeLaterTime() argument 124 if (expected >= 0) { in test_yearsBetween_LocalDateTimeLaterTime() 125 assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); in test_yearsBetween_LocalDateTimeLaterTime() 127 assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 29)), expected); in test_yearsBetween_LocalDateTimeLaterTime() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/ |
D | AbstractPreferencesTest.java | 110 } catch (IllegalArgumentException expected) { in testConstructor() 115 } catch (IllegalArgumentException expected) { in testConstructor() 120 } catch (IllegalArgumentException expected) { in testConstructor() 125 } catch (IllegalArgumentException expected) { in testConstructor() 130 } catch (NullPointerException expected) { in testConstructor() 224 } catch (NullPointerException expected) { in testGet() 237 } catch (IllegalStateException expected) { in testGet() 242 } catch (NullPointerException expected) { in testGet() 250 } catch (NullPointerException expected) { in testGetBoolean() 263 } catch (NullPointerException expected) { in testPutByteArray() [all …]
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
D | SecretKeyFactoryTest.java | 58 } catch (InvalidKeySpecException expected) { in test_PBKDF2_required_parameters() 64 } catch (InvalidKeySpecException expected) { in test_PBKDF2_required_parameters() 70 } catch (InvalidKeySpecException expected) { in test_PBKDF2_required_parameters() 79 } catch (InvalidKeySpecException expected) { in test_PBKDF2_required_parameters() 85 } catch (InvalidKeySpecException expected) { in test_PBKDF2_required_parameters() 91 } catch (InvalidKeySpecException expected) { in test_PBKDF2_required_parameters() 98 } catch (IllegalArgumentException expected) { in test_PBKDF2_required_parameters() 105 } catch (IllegalArgumentException expected) { in test_PBKDF2_required_parameters() 113 byte[] expected = new byte[] { in test_PBKDF2_b3059950() 119 test_PBKDF2_UTF8(PASSWORD, SALT, ITERATIONS, KEY_LENGTH, expected); in test_PBKDF2_b3059950() [all …]
|
/libcore/support/src/test/java/org/apache/harmony/testframework/ |
D | CharSinkTester.java | 83 private static void assertArrayEquals(char[] expected, char[] actual) { in assertArrayEquals() argument 84 Assert.assertEquals(Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 94 char[] expected = new char[] { }; in sinkTestNoWriting() local 98 assertArrayEquals(expected, getChars()); in sinkTestNoWriting() 102 char[] expected = new char[] { }; in sinkTestWriteZeroChars() local 111 assertArrayEquals(expected, getChars()); in sinkTestWriteZeroChars() 115 char[] expected = "EFGCDECBA".toCharArray(); in sinkTestWriteCharByChar() local 118 for (char c : expected) { in sinkTestWriteCharByChar() 123 assertArrayEquals(expected, getChars()); in sinkTestWriteCharByChar() 127 char[] expected = "EFGCDECBA".toCharArray(); in sinkTestWriteArray() local [all …]
|
D | SinkTester.java | 84 private static void assertArrayEquals(byte[] expected, byte[] actual) { in assertArrayEquals() argument 85 Assert.assertEquals(Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 95 byte[] expected = new byte[] { }; in sinkTestNoWriting() 99 assertArrayEquals(expected, getBytes()); in sinkTestNoWriting() 103 byte[] expected = new byte[] { }; in sinkTestWriteZeroBytes() 112 assertArrayEquals(expected, getBytes()); in sinkTestWriteZeroBytes() 116 byte[] expected = new byte[] { 5, 6, 7, 3, 4, 5, 3, 2, 1 }; in sinkTestWriteByteByByte() 119 for (byte b : expected) { in sinkTestWriteByteByByte() 124 assertArrayEquals(expected, getBytes()); in sinkTestWriteByteByByte() 128 byte[] expected = new byte[] { in sinkTestWriteArray() [all …]
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | UrlEncodingTest.java | 55 } catch (URISyntaxException expected) { in testDecodingSpace() 69 } catch (URISyntaxException expected) { in testUriDecodingPartial() 74 } catch (URISyntaxException expected) { in testUriDecodingPartial() 82 } catch (IllegalArgumentException expected) { in testUrlDecoderDecodingPartial() 87 } catch (IllegalArgumentException expected) { in testUrlDecoderDecodingPartial() 95 } catch (URISyntaxException expected) { in testUriDecodingInvalid() 103 } catch (IllegalArgumentException expected) { in testUrlDecoderDecodingInvalid() 111 } catch (IllegalCharsetNameException expected) { in testUrlDecoderFailsOnNullCharset() 112 } catch (NullPointerException expected) { in testUrlDecoderFailsOnNullCharset() 120 } catch (IllegalCharsetNameException expected) { in testUrlDecoderFailsOnEmptyCharset() [all …]
|
/libcore/luni/src/test/java/libcore/java/sql/ |
D | TimestampTest.java | 74 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() 79 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() 84 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() 89 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() 94 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() 99 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() 104 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() 109 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() 114 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() 119 } catch (IllegalArgumentException expected) { } in testValueOfInvalid() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 158 String expected, Object dt) { in test() argument 164 if (expected != null && !out.equals(expected)) { in test() 166 getClassName(dt), out, expected); in test() 184 String expected = test(fmtStr, locale, null, cal); in testDate() local 185 test(fmtStr, locale, expected, zdt); in testDate() 186 test(fmtStr, locale, expected, zdt.toLocalDateTime()); in testDate() 187 test(fmtStr, locale, expected, zdt.toLocalDate()); in testDate() 189 test(fmtStr, locale, expected, ((ZonedDateTime)zdt).toOffsetDateTime()); in testDate() 196 String expected = test(fmtStr, locale, null, cal); in testTime() local 197 test(fmtStr, locale, expected, zdt); in testTime() [all …]
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | DivModTests.java | 96 static void testIntFloorDiv(int x, int y, Object expected) { in testIntFloorDiv() argument 98 if (!resultEquals(result, expected)) { in testIntFloorDiv() 99 fail("FAIL: Math.floorDiv(%d, %d) = %s; expected %s%n", x, y, result, expected); in testIntFloorDiv() 103 if (!resultEquals(strict_result, expected)) { in testIntFloorDiv() 104 … fail("FAIL: StrictMath.floorDiv(%d, %d) = %s; expected %s%n", x, y, strict_result, expected); in testIntFloorDiv() 111 static void testIntFloorMod(int x, int y, Object expected) { in testIntFloorMod() argument 113 if (!resultEquals(result, expected)) { in testIntFloorMod() 114 fail("FAIL: Math.floorMod(%d, %d) = %s; expected %s%n", x, y, result, expected); in testIntFloorMod() 118 if (!resultEquals(strict_result, expected)) { in testIntFloorMod() 119 … fail("FAIL: StrictMath.floorMod(%d, %d) = %s; expected %s%n", x, y, strict_result, expected); in testIntFloorMod() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | KeyRepTest.java | 49 } catch (NullPointerException expected) { in testKeyRep02() 54 } catch (NullPointerException expected) { in testKeyRep02() 59 } catch (NullPointerException expected) { in testKeyRep02() 64 } catch (NullPointerException expected) { in testKeyRep02() 73 } catch (NotSerializableException expected) { in testReadResolve01() 80 } catch (NotSerializableException expected) { in testReadResolve01() 87 } catch (NotSerializableException expected) { in testReadResolve01() 96 } catch (NotSerializableException expected) { in testReadResolve02() 103 } catch (NotSerializableException expected) { in testReadResolve02() 110 } catch (NotSerializableException expected) { in testReadResolve02() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
D | WrappedCharBufferTest2.java | 91 } catch (ReadOnlyBufferException expected) { in testPutcharArrayintint() 92 } catch (NullPointerException expected) { in testPutcharArrayintint() 97 } catch (ReadOnlyBufferException expected) { in testPutcharArrayintint() 98 } catch (BufferOverflowException expected) { in testPutcharArrayintint() 103 } catch (ReadOnlyBufferException expected) { in testPutcharArrayintint() 104 } catch (IndexOutOfBoundsException expected) { in testPutcharArrayintint() 113 } catch (ReadOnlyBufferException expected) { in testPutCharBuffer() 118 } catch (ReadOnlyBufferException expected) { in testPutCharBuffer() 119 } catch (NullPointerException expected) { in testPutCharBuffer() 124 } catch (ReadOnlyBufferException expected) { in testPutCharBuffer() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/invoke/ |
D | MethodTypeTest.java | 45 } catch (NullPointerException expected) { in test_methodType_basicTestsReturnTypeAndParameterClassArray() 51 } catch (NullPointerException expected) { in test_methodType_basicTestsReturnTypeAndParameterClassArray() 57 } catch (IllegalArgumentException expected) { in test_methodType_basicTestsReturnTypeAndParameterClassArray() 70 } catch (NullPointerException expected) { in test_methodType_basicTestsReturnTypeAndParameterClassList() 76 } catch (NullPointerException expected) { in test_methodType_basicTestsReturnTypeAndParameterClassList() 82 } catch (IllegalArgumentException expected) { in test_methodType_basicTestsReturnTypeAndParameterClassList() 95 } catch (NullPointerException expected) { in test_methodType_basicTestsReturnTypeAndVarargsParameters() 101 } catch (NullPointerException expected) { in test_methodType_basicTestsReturnTypeAndVarargsParameters() 107 } catch (IllegalArgumentException expected) { in test_methodType_basicTestsReturnTypeAndVarargsParameters() 120 } catch (NullPointerException expected) { in test_methodType_basicTestsReturnTypeOnly() [all …]
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | OldBidiTest.java | 80 } catch (IllegalArgumentException expected) { in testReorderVisuallyIllegalArguments() 87 } catch (IllegalArgumentException expected) { in testReorderVisuallyIllegalArguments() 94 } catch (IllegalArgumentException expected) { in testReorderVisuallyIllegalArguments() 102 } catch (IllegalArgumentException expected) { in testReorderVisuallyIllegalArguments() 110 } catch (IllegalArgumentException expected) { in testReorderVisuallyIllegalArguments() 119 } catch (IllegalArgumentException expected) { in testRequiresBidiIllegalArguments() 125 } catch (IllegalArgumentException expected) { in testRequiresBidiIllegalArguments() 132 } catch (IllegalArgumentException expected) { in testRequiresBidiIllegalArguments() 139 } catch (IllegalArgumentException expected) { in testRequiresBidiIllegalArguments() 150 } catch (IllegalArgumentException expected) { in testCreateLineBidiIllegalArguments() [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | DataOutputStreamTest.java | 100 byte[] expected = new byte[2 + 65535]; in test_writeUTF() 101 expected[0] = (byte) 0xff; in test_writeUTF() 102 expected[1] = (byte) 0xff; in test_writeUTF() 104 expected[2] = (byte) 0xd9; in test_writeUTF() 105 expected[3] = (byte) 0xa6; in test_writeUTF() 107 expected[4] = (byte) 0xe2; in test_writeUTF() 108 expected[5] = (byte) 0x98; in test_writeUTF() 109 expected[6] = (byte) 0x83; in test_writeUTF() 110 Arrays.fill(expected, 7, expected.length, (byte) 'a'); in test_writeUTF() 111 assertEquals(Arrays.toString(expected), Arrays.toString(bytes.toByteArray())); in test_writeUTF() [all …]
|
D | OldOutputStreamTest.java | 55 boolean expected; in test_write$B() 64 expected = true; in test_write$B() 66 for (int i = 0; i < (shortByteArray.length) && expected; i++) { in test_write$B() 67 expected = (shortByteArray[i] == buffer[i]); in test_write$B() 70 expected); in test_write$B() 80 boolean expected; in test_write$BII() 89 expected = true; in test_write$BII() 91 for (int i = 6, j = 0; j < 5 && expected; i++, j++) { in test_write$BII() 92 expected = (shortByteArray[i] == buffer[j]); in test_write$BII() 95 expected); in test_write$BII()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKZoneIdPrinterParser.java | 115 public void test_print(LocalDateTime ldt, ZoneId zone, String expected) { in test_print() argument 119 assertEquals(output, expected); in test_print() 123 public void test_print_pattern_VV(LocalDateTime ldt, ZoneId zone, String expected) { in test_print_pattern_VV() argument 127 assertEquals(output, expected); in test_print_pattern_VV() 211 … test_parseSuccess_plain(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected) { in test_parseSuccess_plain() argument 216 if (expected != null) { 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() argument 233 if (expected != null) { in test_parseSuccess_prefix() [all …]
|