Home
last modified time | relevance | path

Searched refs:assertThrows (Results 1 – 25 of 110) sorted by relevance

12345

/external/connectedappssdk/tests/robotests/src/test/java/com/google/android/enterprise/connectedapps/robotests/
DCrossProfileTypeProfileTest.java21 import static org.junit.Assert.assertThrows;
104 assertThrows( in profile_withIdentifierForOtherProfile_runsOnOtherProfile()
124 assertThrows( in work_calledFromPersonalProfile_runsOnOtherProfile()
134 assertThrows( in personal_calledFromWorkProfile_runsOnOtherProfile()
168 assertThrows( in primary_calledFromSecondaryProfile_runsOnOtherProfile()
192 assertThrows( in secondary_calledFromPrimaryProfile_runsOnOtherProfile()
230 assertThrows(IllegalStateException.class, () -> type.primary().identityStringMethod(STRING)); in primary_calledOnTypeWithoutConnector_connectorDoesNotHavePrimary_throwsIllegalStateException()
240 assertThrows(IllegalStateException.class, () -> type.secondary().identityStringMethod(STRING)); in secondary_calledOnTypeWithoutConnector_connectorDoesNotHavePrimary_throwsIllegalStateException()
250 assertThrows(IllegalStateException.class, () -> type.suppliers().identityStringMethod(STRING)); in suppliers_calledOnTypeWithoutConnector_connectorDoesNotHavePrimary_throwsIllegalStateException()
309 assertThrows( in personal_synchronous_runningOnPersonal_throwsException_exceptionIsNotWrapped()
[all …]
DOtherProfileSynchronousTest.java20 import static org.junit.Assert.assertThrows;
93 assertThrows( in other_synchronous_isNotBound_throwsUnavailableProfileException()
103 assertThrows( in other_synchronous_isNotInitialised_throwsUnavailableProfileException()
116 assertThrows( in other_synchronous_isBound_automaticConnectionManagement_throwsUnavailableProfileException()
123 assertThrows( in other_serializableObjectParameterIsNotReallySerializable_throwsException()
147 assertThrows( in other_synchronous_throwsException_works()
157 assertThrows( in other_synchronous_declaresMultipleExceptions_throwsException_works()
DCrossProfileTypeUnsupportedTest.java20 import static org.junit.Assert.assertThrows;
84 assertThrows( in other_synchronous_throwsUnavailableProfileException()
110 assertThrows( in work_synchronous_throwsUnavailableProfileException()
136 assertThrows( in personal_synchronous_throwsUnavailableProfileException()
162 assertThrows( in primary_synchronous_throwsUnavailableProfileException()
188 assertThrows( in secondary_synchronous_throwsUnavailableProfileException()
/external/downloader/src/test/java/com/google/android/downloader/
DDataUrlTest.java19 import static org.junit.Assert.assertThrows;
31 assertThrows(DataUrlException.class, () -> DataUrl.parseFromString("http://example.com")); in invalidScheme()
36 assertThrows(DataUrlException.class, () -> DataUrl.parseFromString("data:foobar")); in invalidSyntax()
41 assertThrows(DataUrlException.class, () -> DataUrl.parseFromString("data:text/plain,foobar")); in missingEncoding()
46 assertThrows( in invalidEncoding()
53 assertThrows( in invalidBase64Data()
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/ast/nodeTypes/
DNodeWithVariablesTest.java31 import static org.junit.jupiter.api.Assertions.assertThrows;
48assertThrows(AssertionError.class, () -> parseVariableDeclarationExpr("int a[],b[][]").getCommonTy… in getCommonTypeFailsOnArrayDifferences()
53 assertThrows(AssertionError.class, () -> { in getCommonTypeFailsOnDodgySetterUsage()
62 assertThrows(AssertionError.class, () -> { in getCommonTypeFailsOnInvalidEmptyVariableList()
88 assertThrows(AssertionError.class, () -> { in getElementTypeFailsOnDodgySetterUsage()
97 assertThrows(AssertionError.class, () -> { in getElementTypeFailsOnInvalidEmptyVariableList()
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/utils/
DUtilsTest.java35 import static org.junit.jupiter.api.Assertions.assertThrows;
53 assertThrows(AssertionError.class, () -> assertNotNull(null)); in testAssertNotNull()
59 assertThrows(AssertionError.class, () -> assertNonEmpty("")); in testAssertNonEmpty()
60 assertThrows(AssertionError.class, () -> assertNonEmpty(null)); in testAssertNonEmpty()
67 assertThrows(AssertionError.class, () -> assertNonNegative(-2)); in testAssertNonNegative()
73 assertThrows(AssertionError.class, () -> assertPositive(-2)); in testAssertPositive()
140 assertThrows(IllegalArgumentException.class, () -> capitalize("")); in capitalizeOnEmptyString()
155 assertThrows(IllegalArgumentException.class, () -> decapitalize("")); in decapitalizeOnEmptyString()
/external/ukey2/src/main/javatest/com/google/security/cryptauth/lib/securemessage/
DCryptoOpsTest.java17 import static org.junit.Assert.assertThrows;
126 assertThrows( in testHkdfInvalidLengths()
131 assertThrows( in testHkdfInvalidLengths()
162 assertThrows(IndexOutOfBoundsException.class, () -> CryptoOps.subarray(in, 0, in.length + 1)); in testSubarray()
163 assertThrows(IndexOutOfBoundsException.class, () -> CryptoOps.subarray(in, -1, in.length)); in testSubarray()
164 assertThrows( in testSubarray()
166 assertThrows( in testSubarray()
169 assertThrows( in testSubarray()
/external/icu/tools/cldr/cldr-to-icu/src/test/java/org/unicode/icu/tool/cldrtoicu/localedistance/
DDistanceTableTest.java6 import static org.unicode.icu.tool.cldrtoicu.testing.AssertUtils.assertThrows;
97 IllegalArgumentException e = assertThrows( in testBadDistance()
106 IllegalArgumentException e = assertThrows( in testBadParameters()
114 IllegalArgumentException e = assertThrows( in testBadKeys()
136 IllegalStateException e = assertThrows(IllegalStateException.class, builder::build); in testNoDefaultLanguage()
145 IllegalStateException e = assertThrows(IllegalStateException.class, builder::build); in testNoDefaultScript()
155 IllegalStateException e = assertThrows(IllegalStateException.class, builder::build); in testNoDefaultRegion()
DTrieTest.java7 import static org.unicode.icu.tool.cldrtoicu.testing.AssertUtils.assertThrows;
88 assertThrows( in testBadTrie_BadValue()
99 assertThrows(IllegalStateException.class, () -> trie.root().putPrefixAndValue(23)); in testBadTrie_NoPrefix()
108 assertThrows( in testBadTrie_BadPrefix()
119 assertThrows( in testBadTrie_NoStarInPrefix()
130 assertThrows(IllegalStateException.class, () -> infiniteRecursion(trie.root())); in testBadTrie_TooLong()
/external/protobuf/js/binary/
Dreader_test.js140 assertThrows(function() {
147 assertThrows(function() {reader.readFixed64()});
154 assertThrows(function() {reader.readFixed32()});
160 assertThrows(function() {reader.skipField()});
165 assertThrows(function() {reader.readInt32()});
166 assertThrows(function() {reader.readInt32String()});
167 assertThrows(function() {reader.readInt64()});
168 assertThrows(function() {reader.readInt64String()});
169 assertThrows(function() {reader.readUint32()});
170 assertThrows(function() {reader.readUint32String()});
[all …]
Ddecoder_test.js86 assertThrows(function() {writeValue.call(encoder, -1);});
87 assertThrows(function() {writeValue.call(encoder, upperLimit * 1.1);});
143 assertThrows(function() {writeValue.call(encoder, lowerLimit * 1.1);});
144 assertThrows(function() {writeValue.call(encoder, upperLimit * 1.1);});
262 assertThrows(function() {decoder.readUint64()});
267 assertThrows(function() {decoder.readUnsignedVarint64()});
269 assertThrows(function() {decoder.readSignedVarint64()});
271 assertThrows(function() {decoder.readZigzagVarint64()});
273 assertThrows(function() {decoder.readUnsignedVarint32()});
/external/protobuf/js/compatibility_tests/v3.1.0/binary/
Dreader_test.js140 assertThrows(function() {
147 assertThrows(function() {reader.readFixed64()});
154 assertThrows(function() {reader.readFixed32()});
160 assertThrows(function() {reader.skipField()});
165 assertThrows(function() {reader.readInt32()});
166 assertThrows(function() {reader.readInt32String()});
167 assertThrows(function() {reader.readInt64()});
168 assertThrows(function() {reader.readInt64String()});
169 assertThrows(function() {reader.readUint32()});
170 assertThrows(function() {reader.readUint32String()});
[all …]
Ddecoder_test.js86 assertThrows(function() {writeValue.call(encoder, -1);});
87 assertThrows(function() {writeValue.call(encoder, upperLimit * 1.1);});
143 assertThrows(function() {writeValue.call(encoder, lowerLimit * 1.1);});
144 assertThrows(function() {writeValue.call(encoder, upperLimit * 1.1);});
221 assertThrows(function() {decoder.readUint64()});
226 assertThrows(function() {decoder.readUnsignedVarint64()});
228 assertThrows(function() {decoder.readSignedVarint64()});
230 assertThrows(function() {decoder.readZigzagVarint64()});
232 assertThrows(function() {decoder.readUnsignedVarint32()});
/external/protobuf/js/compatibility_tests/v3.0.0/binary/
Dreader_test.js140 assertThrows(function() {
147 assertThrows(function() {reader.readFixed64()});
154 assertThrows(function() {reader.readFixed32()});
160 assertThrows(function() {reader.skipField()});
165 assertThrows(function() {reader.readInt32()});
166 assertThrows(function() {reader.readInt32String()});
167 assertThrows(function() {reader.readInt64()});
168 assertThrows(function() {reader.readInt64String()});
169 assertThrows(function() {reader.readUint32()});
170 assertThrows(function() {reader.readUint32String()});
[all …]
Ddecoder_test.js86 assertThrows(function() {writeValue.call(encoder, -1);});
87 assertThrows(function() {writeValue.call(encoder, upperLimit * 1.1);});
143 assertThrows(function() {writeValue.call(encoder, lowerLimit * 1.1);});
144 assertThrows(function() {writeValue.call(encoder, upperLimit * 1.1);});
221 assertThrows(function() {decoder.readUint64()});
226 assertThrows(function() {decoder.readUnsignedVarint64()});
228 assertThrows(function() {decoder.readSignedVarint64()});
230 assertThrows(function() {decoder.readZigzagVarint64()});
232 assertThrows(function() {decoder.readUnsignedVarint32()});
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/mediacodec/
DAsynchronousMediaCodecBufferEnqueuerTest.java20 import static org.junit.Assert.assertThrows;
73 assertThrows( in queueInputBuffer_withPendingCryptoExceptionSet_throwsCryptoException()
88 assertThrows( in queueInputBuffer_withPendingIllegalStateExceptionSet_throwsIllegalStateException()
129 assertThrows( in queueSecureInputBuffer_withPendingCryptoException_throwsCryptoException()
146 assertThrows( in queueSecureInputBuffer_codecThrewIllegalStateException_throwsIllegalStateException()
199 assertThrows(IllegalStateException.class, () -> enqueuer.flush()); in flush_onInterruptedException_throwsIllegalStateException()
236 assertThrows(IllegalStateException.class, () -> enqueuer.shutdown()); in shutdown_onInterruptedException_throwsIllegalStateException()
/external/dagger2/javatests/artifacts/hilt-android/simple/app/src/sharedTest/java/dagger/hilt/android/simple/
DDelayComponentReadyTest.java21 import static org.junit.Assert.assertThrows;
78 NullPointerException expected = assertThrows(NullPointerException.class, rule::componentReady); in testUnitializedBindValue_fails()
91 assertThrows(IllegalStateException.class, rule::componentReady); in testDoubleComponentReady_fails()
99 IllegalStateException expected = assertThrows(IllegalStateException.class, rule::inject); in testMissingComponentReady_fails()
108 assertThrows(IllegalStateException.class, rule::delayComponentReady); in testDelayComponentReadyAfterStart_fails()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/
DCompletableDeferredTest.kt43 assertThrows<IllegalStateException> { c.getCancellationException() } in checkFresh()
44 assertThrows<IllegalStateException> { c.getCompleted() } in checkFresh()
45 assertThrows<IllegalStateException> { c.getCompletionExceptionOrNull() } in checkFresh()
60 assertThrows<CancellationException> { c.getCompleted() } in checkCancel()
78 assertThrows<TestException> { c.getCompleted() } in checkCancelWithException()
113 assertThrows<CancellationException> { c.getCompleted() } in testParentCancelsChild()
210 private inline fun <reified T: Throwable> assertThrows(block: () -> Unit) { in assertThrows() method in kotlinx.coroutines.CompletableDeferredTest
/external/connectedappssdk/tests/robotests/src/test/java/com/google/android/enterprise/connectedapps/
DCrossProfileSenderTest.java22 import static org.junit.Assert.assertThrows;
85 assertThrows( in construct_nullContext_throwsNullPointerException()
100 assertThrows( in construct_nullConnectedAppsServiceClassName_throwsNullPointerException()
115 assertThrows( in construct_nullConnectionListener_throwsNullPointerException()
130 assertThrows( in construct_nullAvailabilityListener_throwsNullPointerException()
145 assertThrows( in construct_nullBindingConfig_throwsNullPointerException()
160 assertThrows( in construct_nullTimeoutExecutor_throwsNullPointerException()
175 assertThrows( in construct_nullAvailabilityRestrictions_throwsNullPointerException()
192 assertThrows(IllegalStateException.class, sender::manuallyBind); in manuallyBind_callingFromUIThread_throwsIllegalStateException()
348 assertThrows( in call_isNotBound_throwsUnavailableProfileException()
/external/desugar/test/java/com/google/devtools/build/android/desugar/
DDesugarJava8FunctionalTest.java17 import static com.google.devtools.build.lib.testutil.MoreAsserts.assertThrows;
249 assertThrows(ClassCastException.class, () -> object.copy(Double.valueOf(1))); in testBridgeAndDefaultMethods()
263 assertThrows(ClassCastException.class, () -> top.add(new Object())); in testBridgeAndDefaultMethods()
264 assertThrows(ClassCastException.class, () -> top.add(Double.valueOf(1))); in testBridgeAndDefaultMethods()
265 assertThrows(ClassCastException.class, () -> top.add(Long.valueOf(1))); in testBridgeAndDefaultMethods()
270 assertThrows(ClassCastException.class, () -> top.add(new Object())); in testBridgeAndDefaultMethods()
271 assertThrows(ClassCastException.class, () -> top.add(Double.valueOf(1))); in testBridgeAndDefaultMethods()
272 assertThrows(ClassCastException.class, () -> top.add(Long.valueOf(1))); in testBridgeAndDefaultMethods()
277 assertThrows(ClassCastException.class, () -> levelTwo.add(Double.valueOf(1))); in testBridgeAndDefaultMethods()
278 assertThrows(ClassCastException.class, () -> levelTwo.add(Long.valueOf(1))); in testBridgeAndDefaultMethods()
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/
DIssue343Test.java14 import static org.junit.jupiter.api.Assertions.assertThrows;
43assertThrows(IllegalStateException.class, () -> getExpressionType(typeResolver, parseExpression("n… in toResolveDoubleWeNeedTheAST()
49assertThrows(IllegalStateException.class, () -> getExpressionType(typeResolver, parseExpression("n… in toResolveFloatWeNeedTheAST()
59assertThrows(IllegalStateException.class, () -> getExpressionType(typeResolver, new FieldAccessExp… in resolveLocaleOutsideAST()
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/ast/expr/
DSimpleNameTest.java28 import static org.junit.jupiter.api.Assertions.assertThrows;
39 assertThrows(AssertionError.class, () -> new SimpleName("")); in identifierMustNotBeEmpty()
44 assertThrows(AssertionError.class, () -> new SimpleName(null)); in identifierMustNotBeNull()
/external/exoplayer/tree/library/common/src/test/java/com/google/android/exoplayer2/metadata/emsg/
DEventMessageDecoderTest.java22 import static org.junit.Assert.assertThrows;
62 assertThrows(IllegalArgumentException.class, () -> decoder.decode(buffer)); in decodeEventMessage_failsIfPositionNonZero()
71 assertThrows(IllegalArgumentException.class, () -> decoder.decode(buffer)); in decodeEventMessage_failsIfBufferHasNoArray()
81 assertThrows(IllegalArgumentException.class, () -> decoder.decode(buffer)); in decodeEventMessage_failsIfArrayOffsetNonZero()
/external/connectedappssdk/tests/robotests/src/test/java/com/google/android/enterprise/connectedapps/internal/
DParcelCallSenderTest.java20 import static org.junit.Assert.assertThrows;
91 assertThrows( in makeParcelCall_prepareCallHasError_failsAfter10Retries()
106 assertThrows( in makeParcelCall_callHasError_failsAfter10Retries()
122 assertThrows( in makeParcelCall_fetchResponseHasError_failsAfter10Retries()
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/builders/
DFieldDeclarationBuildersTest.java34 import static org.junit.jupiter.api.Assertions.assertThrows;
43 assertThrows(IllegalStateException.class, () -> new FieldDeclaration().createGetter()); in testOrphanFieldGetter()
48 assertThrows(IllegalStateException.class, () -> new FieldDeclaration().createSetter()); in testOrphanFieldSetter()
107 assertThrows(IllegalStateException.class, () -> { in testCreateGetterWithANonValidField()
116 assertThrows(IllegalStateException.class, () -> { in testCreateSetterWithANonValidField()

12345