Home
last modified time | relevance | path

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

12

/frameworks/base/core/tests/coretests/src/android/view/contentcapture/
DContentCaptureSessionTest.java21 import static org.testng.Assert.assertThrows;
51 assertThrows(NullPointerException.class, () -> mSession1.newAutofillId(null, 42L)); in testNewAutofillId_invalid()
52 assertThrows(IllegalArgumentException.class, in testNewAutofillId_invalid()
78 assertThrows(NullPointerException.class, () -> mSession1.notifyViewAppeared(null)); in testNotifyXXX_null()
79 assertThrows(NullPointerException.class, () -> mSession1.notifyViewDisappeared(null)); in testNotifyXXX_null()
80 assertThrows(NullPointerException.class, in testNotifyXXX_null()
104 assertThrows(NullPointerException.class, in testNotifyViewsDisappeared_invalid()
107 assertThrows(IllegalArgumentException.class, in testNotifyViewsDisappeared_invalid()
110 assertThrows(IllegalArgumentException.class, in testNotifyViewsDisappeared_invalid()
113 assertThrows(IllegalArgumentException.class, in testNotifyViewsDisappeared_invalid()
DContentCaptureManagerTest.java18 import static org.testng.Assert.assertThrows;
50 assertThrows(NullPointerException.class, () -> mManager.removeData(null)); in testRemoveUserData_invalid()
DContentCaptureEventTest.java26 import static org.testng.Assert.assertThrows;
62 assertThrows(NullPointerException.class, () -> event.setAutofillId(null)); in testSetAutofillId_null()
71 assertThrows(NullPointerException.class, () -> event.setAutofillIds(null)); in testSetAutofillIds_null()
80 assertThrows(NullPointerException.class, () -> event.addAutofillId(null)); in testAddAutofillId_null()
273 assertThrows(IllegalArgumentException.class, () -> event.mergeEvent(event2)); in testMergeEvent_typeViewDisappeared_noIds()
279 assertThrows(NullPointerException.class, () -> event.mergeEvent(null)); in testMergeEvent_nullArgument()
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/js/binary/
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()});
235 assertThrows(function() {decoder.readUnsignedVarint32()});
238 assertThrows(function() {decoder.readUnsignedVarint32()});
[all …]
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 …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/
DByteRangeTest.java20 import static org.testng.Assert.assertThrows;
43 assertThrows(IllegalArgumentException.class, () -> new ByteRange(-1, 10)); in constructor_rejectsNegativeStart()
48 assertThrows(IllegalArgumentException.class, () -> new ByteRange(10, 9)); in constructor_rejectsEndBeforeStart()
55 assertThrows(IllegalArgumentException.class, () -> byteRange.extend(0)); in extend_withZeroLength_throwsException()
DSingleStreamDiffScriptWriterTest.java23 import static org.testng.Assert.assertThrows;
64 assertThrows( in writeChunk_withNegativeStart_throwsException()
71 assertThrows( in writeChunk_withZeroLength_throwsException()
DRawBackupWriterTest.java23 import static org.testng.Assert.assertThrows;
62 assertThrows(UnsupportedOperationException.class, () -> mWriter.writeChunk(0, 0)); in writeChunk_throwsUnsupportedOperationException()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/
DCertUtilsTest.java21 import static org.testng.Assert.assertThrows;
93 assertThrows(CertParsingException.class, () -> CertUtils.decodeCert(in)); in decodeCert_readPemFile_throwsIfNoBeginEndLines()
99 assertThrows(CertParsingException.class, () -> CertUtils.decodeCert(in)); in decodeCert_readPemFile_throwsIfEmptyBlock()
105 assertThrows(CertParsingException.class, () -> CertUtils.decodeCert(in)); in decodeCert_readPemFile_throwsIfInvalidCert()
119 assertThrows(CertParsingException.class, () -> CertUtils.decodeCert(modifiedCertBytes)); in decodeCert_readBytes_throwsIfInvalidCert()
134 assertThrows(CertParsingException.class, () -> CertUtils.decodeBase64("EVTVA==")); in decodeBase64_throwsIfInvalidInput()
145 assertThrows(CertParsingException.class, () -> CertUtils.getXmlRootNode(new byte[0])); in getXmlRootNode_throwsIfEmptyInput()
221 assertThrows( in verifyRsaSha256Signature_throwsIfMismatchSignature()
234 assertThrows( in verifyRsaSha256Signature_throwsIfWrongKeyType()
297 assertThrows( in buildCertPath_throwsIfWrongRootCommonName()
[all …]
DCertXmlTest.java21 import static org.testng.Assert.assertThrows;
148 assertThrows( in validateCert_throwsIfRootCertWithDifferentCommonName()
160 assertThrows( in validateCert_throwsIfRootCertWithDifferentPublicKey()
172 assertThrows( in validateCert_throwsIfExpired()
DSigXmlTest.java21 import static org.testng.Assert.assertThrows;
54 assertThrows( in parseAndVerifyFileSignature_throwsIfExpiredCert()
80 assertThrows( in parseAndVerifyFileSignature_throwsIfRootCertWithWrongCommonName()
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DTextClassifierUtilsTest.java21 import static org.testng.Assert.assertThrows;
81 assertThrows(() -> TextClassifier.Utils.getSubString(null, 0, 1, minimumLength)); in testGetSubString_invalidParams()
83 assertThrows(() -> TextClassifier.Utils.getSubString(text, 6, 5, minimumLength)); in testGetSubString_invalidParams()
85 assertThrows(() -> TextClassifier.Utils.getSubString(text, -1, 5, minimumLength)); in testGetSubString_invalidParams()
87 assertThrows(() -> TextClassifier.Utils.getSubString(text, 6, length + 1, minimumLength)); in testGetSubString_invalidParams()
/frameworks/base/core/tests/coretests/src/com/android/internal/infra/
DWhitelistHelperTest.java21 import static org.testng.Assert.assertThrows;
50 assertThrows(IllegalArgumentException.class, in testSetWhitelist_emptyArguments()
52 assertThrows(IllegalArgumentException.class, in testSetWhitelist_emptyArguments()
54 assertThrows(IllegalArgumentException.class, in testSetWhitelist_emptyArguments()
60 assertThrows(NullPointerException.class, in testWhitelistHelper_nullArguments()
62 assertThrows(NullPointerException.class, in testWhitelistHelper_nullArguments()
64 assertThrows(NullPointerException.class, in testWhitelistHelper_nullArguments()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/cdc/
DHkdfTest.java21 import static org.testng.Assert.assertThrows;
77 assertThrows( in hkdf_withNullKey_throwsNullPointerException()
85 assertThrows( in hkdf_withNullSalt_throwsNullPointerException()
92 assertThrows( in hkdf_withNullData_throwsNullPointerException()
DContentDefinedChunkerTest.java23 import static org.testng.Assert.assertThrows;
87 assertThrows( in create_withMinChunkSizeSmallerThanWindowSize_throwsIllegalArgumentException()
104 assertThrows( in create_withMaxChunkSizeSmallerThanMinChunkSize_throwsIllegalArgumentException()
202 assertThrows( in chunkify_whenConsumerThrowsException_rethrowsException()
DFingerprintMixerTest.java21 import static org.testng.Assert.assertThrows;
66 assertThrows( in create_withIncorrectSaltSize_throwsIllegalArgumentException()
81 assertThrows(InvalidKeyException.class, () -> new FingerprintMixer(keySpec, randomSalt())); in create_withUnencodableSecretKey_throwsInvalidKeyException()
DIsChunkBreakpointTest.java21 import static org.testng.Assert.assertThrows;
55 assertThrows(IllegalArgumentException.class, () -> new IsChunkBreakpoint(-1)); in create_withNegativeAverageNumberOfTrials_throwsIllegalArgumentException()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DCrossProfileAppsServiceImplTest.java14 import static org.testng.Assert.assertThrows;
208 assertThrows( in startActivityAsUser_currentUser()
229 assertThrows( in startAnyActivityAsUser_currentUser()
252 assertThrows( in startActivityAsUser_profile_notInstalled()
275 assertThrows( in startAnyActivityAsUser_profile_notInstalled()
296 assertThrows( in startActivityAsUser_profile_fakeCaller()
317 assertThrows( in startAnyActivityAsUser_profile_fakeCaller()
340 assertThrows( in startActivityAsUser_profile_notExported()
363 assertThrows( in startAnyActivityAsUser_profile_notExported()
384 assertThrows( in startActivityAsUser_profile_anotherPackage()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/
DPackageDynamicCodeLoadingTests.java29 import static org.testng.Assert.assertThrows;
112 assertThrows(() -> record(info, entry2)); in testRecord_changeUserForFile_throws()
121 assertThrows(() -> record(info, entry)); in testRecord_badFileType_throws()
298 assertThrows(IOException.class, () -> read("")); in testRead_noHeader_throws()
303 assertThrows(IOException.class, () -> read("DCL2")); in testRead_wrongHeader_throws()
347 assertThrows(IOException.class, () -> read(inputText)); in testRead_missingPackageLine_throws()
356 assertThrows(IOException.class, () -> read(inputText)); in testRead_malformedFile_throws()
365 assertThrows(IOException.class, () -> read(inputText)); in testRead_badFileType_throws()
374 assertThrows(IOException.class, () -> read(inputText)); in testRead_badUserId_throws()
383 assertThrows(IOException.class, () -> read(inputText)); in testRead_missingPackages_throws()
[all …]
/frameworks/base/core/tests/coretests/src/android/hardware/display/
DBrightnessConfigurationTest.java79 assertThrows(IllegalArgumentException.class, () -> { in testCurveMustNotHaveArraysOfDifferentLengths()
85 assertThrows(IllegalArgumentException.class, () -> { in testCurveMustNotHaveArraysOfDifferentLengths()
94 assertThrows(IllegalArgumentException.class, () -> { in testCurvesMustNotContainNaN()
100 assertThrows(IllegalArgumentException.class, () -> { in testCurvesMustNotContainNaN()
159 private static void assertThrows(Class<? extends Throwable> exceptionClass, in assertThrows() method in BrightnessConfigurationTest
DAmbientBrightnessDayStatsTest.java46 assertThrows(NullPointerException.class, in testParamsMustNotBeNull()
49 assertThrows(NullPointerException.class, in testParamsMustNotBeNull()
52 assertThrows(NullPointerException.class, in testParamsMustNotBeNull()
55 assertThrows(NullPointerException.class, in testParamsMustNotBeNull()
159 private static void assertThrows(Class<? extends Throwable> exceptionClass, in assertThrows() method in AmbientBrightnessDayStatsTest
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DKernelCpuThreadReaderTest.java24 import static org.testng.Assert.assertThrows;
369 assertThrows( in testUidPredicate_emptyRangeString()
376 assertThrows( in testUidPredicate_singleNumber()
383 assertThrows( in testUidPredicate_lettersInRange()
391 assertThrows( in testUidPredicate_onlyLetters()
398 assertThrows( in testUidPredicate_backwardsRange()
405 assertThrows( in testUidPredicate_comma()
DKernelCpuThreadReaderDiffTest.java23 import static org.testng.Assert.assertThrows;
97 assertThrows( in test_failure()
119 assertThrows( in test_twoFailures()
122 assertThrows( in test_twoFailures()
268 assertThrows( in test_failureAndNewThread()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/keys/
DRecoverableKeyStoreSecondaryKeyTest.java21 import static org.testng.Assert.assertThrows;
95 assertThrows( in constructor_withNullSecretKey_throwsNullPointerException()
105 assertThrows( in constructor_withNullAlias_throwsNullPointerException()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DSecureBoxTest.java21 import static org.testng.Assert.assertThrows;
299 assertThrows( in decrypt_badAuthenticationTag()
312 assertThrows( in encrypt_invalidPublicKey()
325 assertThrows( in decrypt_invalidPrivateKey()

12