Home
last modified time | relevance | path

Searched refs:expectedException (Results 1 – 25 of 27) sorted by relevance

12

/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/stringprep/
DTestIDNARef.java108 private void doTestToUnicode(String src, String expected, int options, Object expectedException) in doTestToUnicode() argument
125 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
129 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
140 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
144 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
155 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
159 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
165 …private void doTestIDNToUnicode(String src, String expected, int options, Object expectedException) in doTestIDNToUnicode() argument
182 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestIDNToUnicode()
186 if(expectedException == null || !expectedException.equals(ex)){ in doTestIDNToUnicode()
[all …]
DTestIDNA.java85 private void doTestToUnicode(String src, String expected, int options, Object expectedException) in doTestToUnicode() argument
96 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
100 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
111 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
115 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
126 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
130 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
136 …private void doTestIDNToUnicode(String src, String expected, int options, Object expectedException) in doTestIDNToUnicode() argument
147 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestIDNToUnicode()
151 if(expectedException == null || !expectedException.equals(ex)){ in doTestIDNToUnicode()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/
DTestIDNARef.java111 private void doTestToUnicode(String src, String expected, int options, Object expectedException) in doTestToUnicode() argument
128 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
132 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
143 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
147 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
158 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
162 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
168 …private void doTestIDNToUnicode(String src, String expected, int options, Object expectedException) in doTestIDNToUnicode() argument
185 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestIDNToUnicode()
189 if(expectedException == null || !expectedException.equals(ex)){ in doTestIDNToUnicode()
[all …]
DTestIDNA.java88 private void doTestToUnicode(String src, String expected, int options, Object expectedException) in doTestToUnicode() argument
99 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
103 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
114 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
118 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
129 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestToUnicode()
133 if(expectedException == null || !ex.equals(expectedException)){ in doTestToUnicode()
139 …private void doTestIDNToUnicode(String src, String expected, int options, Object expectedException) in doTestIDNToUnicode() argument
150 if(expectedException!=null && !unassignedException.equals(expectedException)){ in doTestIDNToUnicode()
154 if(expectedException == null || !expectedException.equals(ex)){ in doTestIDNToUnicode()
[all …]
/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/trace/propagation/
DBinaryFormatImplTest.java51 @Rule public ExpectedException expectedException = ExpectedException.none(); field in BinaryFormatImplTest
100 expectedException.expect(SpanContextParseException.class); in fromBinaryValue_EmptyInput()
101 expectedException.expectMessage("Unsupported version."); in fromBinaryValue_EmptyInput()
107 expectedException.expect(SpanContextParseException.class); in fromBinaryValue_UnsupportedVersionId()
108 expectedException.expectMessage("Unsupported version."); in fromBinaryValue_UnsupportedVersionId()
118 expectedException.expect(SpanContextParseException.class); in fromBinaryValue_UnsupportedFieldIdFirst()
119 expectedException.expectMessage( in fromBinaryValue_UnsupportedFieldIdFirst()
130 expectedException.expect(SpanContextParseException.class); in fromBinaryValue_UnsupportedFieldIdSecond()
131 expectedException.expectMessage( in fromBinaryValue_UnsupportedFieldIdSecond()
155 expectedException.expect(SpanContextParseException.class); in fromBinaryValue_ShorterTraceId()
[all …]
/external/mockito/src/test/java/org/mockitoutil/
DJUnitResultAssert.java38 public JUnitResultAssert fails(int expectedFailureCount, Class expectedException) { in fails() argument
41 if (!expectedException.isInstance(f.getException())) { in fails()
42 …throw new AssertionError("Incorrect failure type, expected: " + expectedException + ", actual: " +… in fails()
83 public JUnitResultAssert fails(Class expectedException, String exceptionMessage) { in fails() argument
84 fails(1, expectedException); in fails()
93 public JUnitResultAssert fails(String methodName, Class expectedException) { in fails() argument
95 …if (methodName.equals(f.getDescription().getMethodName()) && expectedException.isInstance(f.getExc… in fails()
99 … AssertionError("Method '" + methodName + "' did not fail with: " + expectedException.getSimpleNam… in fails()
106 …lic JUnitResultAssert fails(int expectedFailureCount, String methodName, Class expectedException) { in fails() argument
107 return fails(expectedFailureCount, expectedException) in fails()
[all …]
/external/mockito/src/test/java/org/mockito/verification/
DNegativeDurationTest.java15 public ExpectedException expectedException = ExpectedException.none(); field in NegativeDurationTest
19 expectedException.expect(FriendlyReminderException.class); in should_throw_exception_when_duration_is_negative_for_timeout_method()
20 expectedException.expectMessage("Don't panic! I'm just a friendly reminder!"); in should_throw_exception_when_duration_is_negative_for_timeout_method()
26 expectedException.expect(FriendlyReminderException.class); in should_throw_exception_when_duration_is_negative_for_after_method()
27 expectedException.expectMessage("Don't panic! I'm just a friendly reminder!"); in should_throw_exception_when_duration_is_negative_for_after_method()
/external/mockito/src/test/java/org/mockito/internal/util/
DChecksTest.java16 public ExpectedException expectedException = ExpectedException.none(); field in ChecksTest
30 expectedException.expect(IllegalArgumentException.class); in checkNotNull_null()
31 expectedException.expectMessage("someValue should not be null"); in checkNotNull_null()
37 expectedException.expect(IllegalArgumentException.class); in checkNotNull_null_additonal_message()
38 expectedException.expectMessage("someValue should not be null. Oh no!"); in checkNotNull_null_additonal_message()
DTimerTest.java16 public ExpectedException expectedException = ExpectedException.none(); field in TimerTest
46 expectedException.expect(FriendlyReminderException.class); in should_throw_friendly_reminder_exception_when_duration_is_negative()
47 expectedException.expectMessage("Don't panic! I'm just a friendly reminder!"); in should_throw_friendly_reminder_exception_when_duration_is_negative()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowAssetManagerTest.java36 public ExpectedException expectedException = ExpectedException.none(); field in ShadowAssetManagerTest
50 expectedException.expect(FileNotFoundException.class); in openFd_shouldProvideFileDescriptorForDeflatedAsset()
51expectedException.expectMessage("This file can not be opened as a file descriptor; it is probably … in openFd_shouldProvideFileDescriptorForDeflatedAsset()
84 expectedException.expect(IOException.class); in openNonAssetShouldThrowExceptionWhenFileDoesNotExist()
85 expectedException.expectMessage( in openNonAssetShouldThrowExceptionWhenFileDoesNotExist()
95 expectedException.expect(Resources.NotFoundException.class); in unknownResourceIdsShouldReportPackagesSearched()
96 expectedException.expectMessage("Resource ID #0xffffffff"); in unknownResourceIdsShouldReportPackagesSearched()
106 expectedException.expect(Resources.NotFoundException.class); in forSystemResources_unknownResourceIdsShouldReportPackagesSearched()
107 expectedException.expectMessage("Resource ID #0xffffffff"); in forSystemResources_unknownResourceIdsShouldReportPackagesSearched()
196 expectedException.expect(RuntimeException.class); in whenStyleAttrResolutionFails_attrsToTypedArray_returnsNiceErrorMessage()
[all …]
DShadowNfcAdapterTest.java24 @Rule public ExpectedException expectedException = ExpectedException.none(); field in ShadowNfcAdapterTest
61 expectedException.expect(NullPointerException.class); in setOnNdefPushCompleteCallback_throwsOnNullActivity()
62 expectedException.expectMessage("activity cannot be null"); in setOnNdefPushCompleteCallback_throwsOnNullActivity()
74 expectedException.expect(NullPointerException.class); in setOnNdefPushCompleteCallback_throwsOnNullInActivities()
75 expectedException.expectMessage("activities cannot contain null"); in setOnNdefPushCompleteCallback_throwsOnNullInActivities()
139 expectedException.expect(IllegalStateException.class); in getNdefPushMessage_messageNotSet_throwsIllegalStateException()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/junit/rules/
DExpectedLogMessagesRuleTest.java16 private ExpectedException expectedException = ExpectedException.none(); field in ExpectedLogMessagesRuleTest
18 @Rule public RuleChain chain = RuleChain.outerRule(expectedException).around(rule);
22 expectedException.expect(AssertionError.class); in testAndroidExpectedLogMessagesFailsWithMessage()
34 expectedException.expect(AssertionError.class); in testNoExpectedMessageFailsTest()
40 expectedException.expect(AssertionError.class); in testNoExpectedTagFailsTest()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/flow/
DFlowInvariantsTest.kt17 expectedException: KClass<out Throwable>? = null, in <lambda>()
21 check(r1, expectedException) in <lambda>()
25 check(r2, expectedException) in <lambda>()
34 private fun check(exception: Throwable?, expectedException: KClass<out Throwable>?) { in <lambda>()
35 …if (expectedException != null && exception == null) fail("Expected $expectedException, but test co… in <lambda>()
36 …if (expectedException != null && exception != null) assertTrue(expectedException.isInstance(except… in <lambda>()
37 if (expectedException == null && exception != null) throw exception in <lambda>()
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DGzipInflatingBufferTest.java208 } catch (IllegalStateException expectedException) { in closeStopsDecompression()
209 assertEquals("GzipInflatingBuffer is closed", expectedException.getMessage()); in closeStopsDecompression()
439 } catch (ZipException expectedException) { in wrongHeaderMagicShouldFail()
440 assertEquals("Not in GZIP format", expectedException.getMessage()); in wrongHeaderMagicShouldFail()
452 } catch (ZipException expectedException) { in wrongHeaderCompressionMethodShouldFail()
453 assertEquals("Unsupported compression method", expectedException.getMessage()); in wrongHeaderCompressionMethodShouldFail()
530 } catch (ZipException expectedException) { in headerInvalidFhcrcFlagFails()
531 assertEquals("Corrupt GZIP header", expectedException.getMessage()); in headerInvalidFhcrcFlagFails()
586 } catch (DataFormatException expectedException) { in headerFExtraFlagWithMissingExtraLenFails()
589 expectedException.getMessage().startsWith("Inflater data format exception:")); in headerFExtraFlagWithMissingExtraLenFails()
[all …]
/external/grpc-grpc-java/protobuf/src/test/java/io/grpc/protobuf/
DStatusProtoTest.java81 } catch (IllegalArgumentException expectedException) { in toStatusRuntimeException_shouldThrowIfStatusCodeInvalid()
82 assertEquals("invalid status code", expectedException.getMessage()); in toStatusRuntimeException_shouldThrowIfStatusCodeInvalid()
123 } catch (IllegalArgumentException expectedException) { in toStatusException_shouldThrowIfStatusCodeInvalid()
124 assertEquals("invalid status code", expectedException.getMessage()); in toStatusException_shouldThrowIfStatusCodeInvalid()
/external/objenesis/main/src/test/java/org/objenesis/
DObjenesisTest.java32 public ExpectedException expectedException = ExpectedException.none(); field in ObjenesisTest
73 expectedException.expect(IllegalArgumentException.class); in testGetInstantiatorOf_primitive()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/array/
DPrimitiveArrayTest.java78 private void tryInvalid(String t, Class<?> expectedException) { in tryInvalid() argument
82 fail("Expected " + expectedException.getCanonicalName() + " but loaded = \"" + loaded in tryInvalid()
85 assertEquals(expectedException, e.getCause().getClass()); in tryInvalid()
/external/kotlinx.coroutines/kotlinx-coroutines-test/test/
DTestRunBlockingTest.kt363 val expectedException = IllegalAccessError("hello") in <lambda>() constant
366 throw expectedException in <lambda>()
/external/objenesis/tck/src/test/java/org/objenesis/tck/
DCandidateLoaderTest.java103 catch(IOException expectedException) { in testThrowsIOExceptionIfResourceNotInClassPath()
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DAbstractAbstractFutureTest.java456 private static void assertFailed(AbstractFuture<Integer> future, Throwable expectedException) in assertFailed() argument
465 assertThat(e.getCause()).isSameAs(expectedException); in assertFailed()
472 assertThat(e).hasCauseThat().isSameAs(expectedException); in assertFailed()
DFuturesTest.java1019 RuntimeException expectedException = new RuntimeException();
1020 runExpectedExceptionCatchingAsyncTest(expectedException, false);
1024 Exception expectedException = new Exception() {};
1025 runExpectedExceptionCatchingAsyncTest(expectedException, false);
1047 RuntimeException expectedException = new RuntimeException();
1048 runExpectedExceptionCatchingAsyncTest(expectedException, true);
1052 Exception expectedException = new Exception() {};
1053 runExpectedExceptionCatchingAsyncTest(expectedException, true);
1057 final Exception expectedException, final boolean wrapInFuture) throws Exception {
1064 throw expectedException;
[all …]
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DAbstractAbstractFutureTest.java456 private static void assertFailed(AbstractFuture<Integer> future, Throwable expectedException) in assertFailed() argument
465 assertThat(e.getCause()).isSameAs(expectedException); in assertFailed()
472 assertThat(e).hasCauseThat().isSameAs(expectedException); in assertFailed()
DFuturesTest.java1019 RuntimeException expectedException = new RuntimeException();
1020 runExpectedExceptionCatchingAsyncTest(expectedException, false);
1024 Exception expectedException = new Exception() {};
1025 runExpectedExceptionCatchingAsyncTest(expectedException, false);
1047 RuntimeException expectedException = new RuntimeException();
1048 runExpectedExceptionCatchingAsyncTest(expectedException, true);
1052 Exception expectedException = new Exception() {};
1053 runExpectedExceptionCatchingAsyncTest(expectedException, true);
1057 final Exception expectedException, final boolean wrapInFuture) throws Exception {
1064 throw expectedException;
[all …]
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/xml/
DHasXPathTest.java112 } catch (IllegalArgumentException expectedException) { in throwsIllegalArgumentExceptionIfGivenIllegalExpression()
/external/conscrypt/common/src/test/java/org/conscrypt/javax/net/ssl/
DSSLSocketVersionCompatibilityTest.java452 final RuntimeException expectedException = new RuntimeException("expected"); in test_SSLSocket_HandshakeCompletedListener_RuntimeException() local
472 throw expectedException; in test_SSLSocket_HandshakeCompletedListener_RuntimeException()
480 assertSame(expectedException, test.actualException); in test_SSLSocket_HandshakeCompletedListener_RuntimeException()

12