/libcore/luni/src/test/java/libcore/xml/ |
H A D | XsltXPathConformanceTestSuite.java | 308 * the result to an expected output file. 325 * "manual", or null for expected execution errors. 413 * @param expected a file containing an XML document fragment. 415 private void assertNodesAreEquivalent(File expected, Node actual) argument 419 Node expectedNode = fileToResultNode(expected); 423 Assert.assertEquals("Expected XML to match file " + expected,
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | KeyFactoryTest.java | 590 private void checkException(String message, Exception thrown, Class<? extends Exception> expected) { argument 593 fail(message + ", expected " + expected.getName()); 595 } else if (expected == thrown.getClass()) { 600 fail(message + ", unexpected exception: " + thrown + ", expected: " + expected.getName());
|
/libcore/ojluni/src/main/java/sun/security/ssl/ |
H A D | SignatureAndHashAlgorithm.java | 235 Collection<SignatureAndHashAlgorithm> algorithms, String expected) { 238 algorithms, expected, null); 243 String expected, PrivateKey signingKey) { 245 if (expected == null && !algorithms.isEmpty()) { 255 if (expected == null ) { 256 return null; // no expected algorithm, no supported algorithm 265 expected.equalsIgnoreCase("rsa")) { 295 if (expected.equalsIgnoreCase("rsa") && 301 (expected.equalsIgnoreCase("dsa") && 303 (expected 234 getPreferableAlgorithm( Collection<SignatureAndHashAlgorithm> algorithms, String expected) argument 241 getPreferableAlgorithm( Collection<SignatureAndHashAlgorithm> algorithms, String expected, PrivateKey signingKey) argument [all...] |
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
H A D | SpliteratorTestHelper.java | 48 void assertContents(Collection<T> actual, Collection<T> expected, boolean isOrdered); argument 607 private static<T> void assertContents(Collection<T> actual, Collection<T> expected, boolean isOrdered) { argument 609 assertEquals(actual, expected); 612 LambdaTestHelpers.assertContentsUnordered(actual, expected); 616 private static void executeAndCatch(Class<? extends Exception> expected, Runnable r) { argument 626 String.format("No Exception was thrown, expected an Exception of %s to be thrown", 627 expected.getName())); 628 assertTrue(expected.isInstance(caught), 630 caught.getClass().getName(), expected.getName()));
|
H A D | OpTestCase.java | 81 * @param expected the expected result 85 void assertResult(R actual, R expected, boolean isOrdered, boolean isParallel); argument 142 // Run multiple versions of exercise() with multiple terminal operations for all kinds of stream, , and asserting against the expected result 146 R expected, 155 .expectedResult(expected) 162 // Run multiple versions of exercise() with multiple terminal operation for all kinds of stream, and asserting against the expected result 167 Collection<Integer> expected, 181 exerciseTerminalOpsMulti(data, expected, m, terminals); 192 Collection<U> exerciseOps(Collection<T> data, Function<Stream<T>, S_OUT> m, I expected) { argument 145 exerciseTerminalOpsMulti(TestData<T, S_IN> data, R expected, Map<String, Function<S_IN, S_OUT>> streams, Map<String, Function<S_OUT, R>> terminals) argument 166 exerciseTerminalOpsInt(TestData<Integer, Stream<Integer>> data, Collection<Integer> expected, String desc, Function<Stream<Integer>, Stream<Integer>> mRef, Function<IntStream, IntStream> mInt, Function<LongStream, LongStream> mLong, Function<DoubleStream, DoubleStream> mDouble, Map<String, Function<Stream<Integer>, Collection<Integer>>> terminals) argument 203 exerciseOps(int[] data, Function<IntStream, IntStream> m, int[] expected) argument 595 exerciseTerminalOps(Collection<T> data, Function<Stream<T>, R> m, R expected) argument [all...] |
H A D | LambdaTestHelpers.java | 277 public static<T> void assertContents(Iterable<T> actual, Iterable<T> expected) { argument 278 if (actual instanceof Collection && expected instanceof Collection) { 279 assertEquals(actual, expected); 281 assertContents(actual.iterator(), expected.iterator()); 285 public static<T> void assertContents(Iterator<T> actual, Iterator<T> expected) { argument 286 assertEquals(toBoxedList(actual), toBoxedList(expected)); 291 public static<T> void assertContents(Iterator<T> actual, T... expected) { argument 292 assertContents(actual, Arrays.asList(expected).iterator()); 395 public static<T> void assertContentsUnordered(Iterable<T> actual, Iterable<T> expected) { argument 396 assertContentsUnordered(actual.iterator(), expected 399 assertContentsUnordered(Iterator<T> actual, Iterator<T> expected) argument [all...] |
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
H A D | SpliteratorTestHelper.java | 48 void assertContents(Collection<T> actual, Collection<T> expected, boolean isOrdered); argument 607 private static<T> void assertContents(Collection<T> actual, Collection<T> expected, boolean isOrdered) { argument 609 assertEquals(actual, expected); 612 LambdaTestHelpers.assertContentsUnordered(actual, expected); 616 private static void executeAndCatch(Class<? extends Exception> expected, Runnable r) { argument 626 String.format("No Exception was thrown, expected an Exception of %s to be thrown", 627 expected.getName())); 628 assertTrue(expected.isInstance(caught), 630 caught.getClass().getName(), expected.getName()));
|
H A D | LambdaTestHelpers.java | 278 public static<T> void assertContents(Iterable<T> actual, Iterable<T> expected) { argument 279 if (actual instanceof Collection && expected instanceof Collection) { 280 assertEquals(actual, expected); 282 assertContents(actual.iterator(), expected.iterator()); 286 public static<T> void assertContents(Iterator<T> actual, Iterator<T> expected) { argument 287 assertEquals(toBoxedList(actual), toBoxedList(expected)); 292 public static<T> void assertContents(Iterator<T> actual, T... expected) { argument 293 assertContents(actual, Arrays.asList(expected).iterator()); 396 public static<T> void assertContentsUnordered(Iterable<T> actual, Iterable<T> expected) { argument 397 assertContentsUnordered(actual.iterator(), expected 400 assertContentsUnordered(Iterator<T> actual, Iterator<T> expected) argument [all...] |
H A D | OpTestCase.java | 82 * @param expected the expected result 86 void assertResult(R actual, R expected, boolean isOrdered, boolean isParallel); argument 143 // Run multiple versions of exercise() with multiple terminal operations for all kinds of stream, , and asserting against the expected result 147 R expected, 156 .expectedResult(expected) 163 // Run multiple versions of exercise() with multiple terminal operation for all kinds of stream, and asserting against the expected result 168 Collection<Integer> expected, 182 exerciseTerminalOpsMulti(data, expected, m, terminals); 193 Collection<U> exerciseOps(Collection<T> data, Function<Stream<T>, S_OUT> m, I expected) { argument 146 exerciseTerminalOpsMulti(TestData<T, S_IN> data, R expected, Map<String, Function<S_IN, S_OUT>> streams, Map<String, Function<S_OUT, R>> terminals) argument 167 exerciseTerminalOpsInt(TestData<Integer, Stream<Integer>> data, Collection<Integer> expected, String desc, Function<Stream<Integer>, Stream<Integer>> mRef, Function<IntStream, IntStream> mInt, Function<LongStream, LongStream> mLong, Function<DoubleStream, DoubleStream> mDouble, Map<String, Function<Stream<Integer>, Collection<Integer>>> terminals) argument 204 exerciseOps(int[] data, Function<IntStream, IntStream> m, int[] expected) argument 596 exerciseTerminalOps(Collection<T> data, Function<Stream<T>, R> m, R expected) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
H A D | URITest.java | 175 + constructorTestsInvalid[i] + " expected: " 200 "//", // Authority expected 201 "ascheme://", // Authority expected 202 "ascheme:", // Scheme-specific part expected 258 fail("TestA, URISyntaxException expected, but not received."); 266 fail("TestB, URISyntaxException expected, but not received."); 274 fail("TestC, URISyntaxException expected, but not received."); 423 fail("URISyntaxException expected but not received."); 470 fail("URISyntaxException expected but not received."); 642 fail("IllegalArgumentException expected bu 1392 testNormalize(String original, String expected) argument 1596 testRelativize(String base, String target, String expected) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
H A D | CharsetDecoderTest.java | 315 fail("NullPointerException expected"); 320 fail("NullPointerException expected"); 560 private void assertCharBufferValue(String expected, CharBuffer out) { argument 564 assertEquals(expected, new String(out.array(), out.arrayOffset(), out 609 } catch (IllegalStateException expected) { 628 } catch (IllegalStateException expected) {
|
H A D | CharsetEncoderTest.java | 290 } catch (IllegalStateException expected) { 308 } catch (IllegalStateException expected) { 596 private byte[] addSurrogate(byte[] expected) { argument 598 byte[] temp = new byte[surrogate.length + expected.length]; 600 System.arraycopy(expected, 0, temp, surrogate.length, 601 expected.length); 602 expected = temp; 604 return expected; 691 void assertByteArray(ByteBuffer out, byte[] expected) { argument 699 assertTrue(Arrays.equals(ba, expected)); [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
H A D | SimpleDateFormatTest.java | 70 // expected 78 // expected 96 } catch (NullPointerException expected) { 102 } catch (IllegalArgumentException expected) { 119 } catch (NullPointerException expected) { 124 } catch (IllegalArgumentException expected) { 139 } catch (IllegalArgumentException expected) { 145 } catch (IllegalArgumentException expected) { 151 } catch (NullPointerException expected) { 238 } catch (NullPointerException expected) { 394 assertFormat(SimpleDateFormat format, String pattern, Calendar cal, String expected, int field) argument 816 assertParse(String pattern, String input, Date expected, int start, int end) argument [all...] |
H A D | DecimalFormatTest.java | 526 // expected 532 // expected 541 // expected 548 // expected 554 } catch (IllegalArgumentException expected) { 815 } catch (NullPointerException expected) { 821 } catch (IllegalArgumentException expected) { 827 } catch (IllegalArgumentException expected) { 849 } catch (NullPointerException expected) { 854 } catch (NullPointerException expected) { 2562 format(DecimalFormat format, String expected, double value) argument 2571 format(DecimalFormat format, String expected, int value) argument [all...] |
/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | RecursiveTaskTest.java | 90 <T> void checkCompletedNormally(RecursiveTask<T> a, T expected) { argument 96 assertSame(expected, a.getRawResult()); 97 assertSame(expected, a.join()); 101 assertSame(expected, a.get()); 104 assertSame(expected, a.get(5L, SECONDS)); 112 void checkCompletesNormally(RecursiveTask<Integer> a, int expected) { argument 114 assertEquals(expected, (int) r); 122 void checkCompletedNormally(RecursiveTask<Integer> a, int expected) { argument 124 assertEquals(expected, (int) r); 168 } catch (Throwable expected) { [all...] |
H A D | AbstractQueuedLongSynchronizerTest.java | 152 Thread... expected) { 154 assertEquals(expected.length > 0, sync.hasQueuedThreads()); 155 assertEquals(expected.length, sync.getQueueLength()); 156 assertEquals(expected.length, actual.size()); 157 assertEquals(expected.length == 0, actual.isEmpty()); 159 new HashSet<Thread>(Arrays.asList(expected))); 166 Thread... expected) { 167 assertHasQueuedThreads(sync, expected); 178 Thread... expected) { 179 assertHasQueuedThreads(sync, expected); 151 assertHasQueuedThreads(AbstractQueuedLongSynchronizer sync, Thread... expected) argument 165 assertHasExclusiveQueuedThreads(AbstractQueuedLongSynchronizer sync, Thread... expected) argument 177 assertHasSharedQueuedThreads(AbstractQueuedLongSynchronizer sync, Thread... expected) argument [all...] |
H A D | AbstractQueuedSynchronizerTest.java | 155 Thread... expected) { 157 assertEquals(expected.length > 0, sync.hasQueuedThreads()); 158 assertEquals(expected.length, sync.getQueueLength()); 159 assertEquals(expected.length, actual.size()); 160 assertEquals(expected.length == 0, actual.isEmpty()); 162 new HashSet<Thread>(Arrays.asList(expected))); 169 Thread... expected) { 170 assertHasQueuedThreads(sync, expected); 181 Thread... expected) { 182 assertHasQueuedThreads(sync, expected); 154 assertHasQueuedThreads(AbstractQueuedSynchronizer sync, Thread... expected) argument 168 assertHasExclusiveQueuedThreads(AbstractQueuedSynchronizer sync, Thread... expected) argument 180 assertHasSharedQueuedThreads(AbstractQueuedSynchronizer sync, Thread... expected) argument [all...] |
H A D | ForkJoinTask8Test.java | 121 <T> void checkCompletedNormally(ForkJoinTask<T> a, T expected) { argument 127 assertSame(expected, a.getRawResult()); 134 assertSame(expected, a.join()); 150 assertSame(expected, a.get()); 153 assertSame(expected, a.get(5L, SECONDS)); 173 } catch (Throwable expected) { 174 assertSame(t.getClass(), expected.getClass());
|
H A D | ForkJoinTaskTest.java | 96 <T> void checkCompletedNormally(ForkJoinTask<T> a, T expected) { argument 102 assertSame(expected, a.getRawResult()); 107 assertSame(expected, a.join()); 123 assertSame(expected, a.get()); 126 assertSame(expected, a.get(5L, SECONDS)); 181 } catch (Throwable expected) { 182 assertSame(t.getClass(), expected.getClass());
|
/libcore/luni/src/test/java/libcore/java/util/prefs/ |
H A D | OldAbstractPreferencesTest.java | 40 /** Timeout used for Object.wait when no action is expected. */ 43 /** Timeout used for Object.wait when an action is expected. */ 85 fail("NullPointerException expected"); 87 //expected 99 fail("IllegalArgumentException expected"); 101 //expected 112 fail("IllegalArgumentException expected"); 114 //expected 121 fail("IllegalStateException expected"); 123 //expected 893 assertChanged(boolean expected) argument 943 assertAdded(boolean expected) argument 950 assertRemoved(boolean expected) argument [all...] |
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/ |
H A D | URLConnectionTest.java | 89 // expected 99 // expected 116 // expected 133 // expected 148 fail("Assert 0: expected an IllegalStateException"); 150 // expected 166 fail("Assert 0: expected an IllegalStateException"); 168 // expected 327 } catch (IllegalStateException expected) { 419 // expected 991 assertContentTypeEquals(String encoding, String expected, String header) argument [all...] |
/libcore/ojluni/src/lambda/java/java/lang/invoke/ |
H A D | MethodHandles.java | 41 reflectAs(Class<T> expected, MethodHandle target) { return null; } argument
|
/libcore/support/src/test/java/libcore/java/security/ |
H A D | StandardNames.java | 42 * This class defines expected string names for protocols, key types, 1051 Set<String> expected, String[] cipherSuites) { 1055 // Make sure all cipherSuites names are expected 1056 Set remainingCipherSuites = new HashSet<String>(expected); 1073 private static void assertSupportedCipherSuites(Set<String> expected, String[] cipherSuites) { argument 1074 Set<String> remainingCipherSuites = assertValidCipherSuites(expected, cipherSuites); 1076 assertEquals(expected.size(), cipherSuites.length); 1086 private static Set<String> assertValidProtocols(Set<String> expected, String[] protocols) { argument 1090 // Make sure all protocols names are expected 1091 Set remainingProtocols = new HashSet<String>(expected); 1050 assertValidCipherSuites( Set<String> expected, String[] cipherSuites) argument 1107 assertSupportedProtocols(Set<String> expected, String[] protocols) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
H A D | FieldTest.java | 39 // unreachable before. Also some tests expected the wrong excpetions 209 fail("No expected IllegalArgumentException"); 214 assertTrue("IllegalArgumentException expected but not thrown", thrown); 226 assertTrue("NullPointerException expected but not thrown", thrown); 235 fail("No exception expected"); 242 Class expected) { 275 assertTrue("expected " + expected + " for " + f.getName(), 276 expected == null || expected 241 getField(char primitiveType, Object o, Field f, Class expected) argument 289 setField(char primitiveType, Object o, Field f, Class expected, Object value) argument [all...] |
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
H A D | AnnotationsTest.java | 451 } catch (NullPointerException expected) { 457 } catch (NullPointerException expected) { 477 } catch (NullPointerException expected) { 513 private void assertSetEquals(Object[] actual, Object... expected) { argument 515 Set<Object> expectedSet = new HashSet<Object>(Arrays.asList(expected));
|