/cts/tests/tests/car_permission_tests/src/android/car/cts/permissiontest/cluster/ |
D | ClusterHomeManagerPermissionTest.java | 86 SecurityException thrown = assertThrows(SecurityException.class, in testRegisterClusterStateListener_requiresPermission() local 89 assertThat(thrown.getMessage()).isEqualTo(EXPECTED_ERROR_MESSAGE); in testRegisterClusterStateListener_requiresPermission() 94 SecurityException thrown = assertThrows(SecurityException.class, in testRegisterClusterNavigationStateListener_requiresPermission() local 97 assertThat(thrown.getMessage()) in testRegisterClusterNavigationStateListener_requiresPermission() 103 SecurityException thrown = assertThrows(SecurityException.class, in testGetClusterState_requiresPermission() local 105 assertThat(thrown.getMessage()).isEqualTo(EXPECTED_ERROR_MESSAGE); in testGetClusterState_requiresPermission() 110 SecurityException thrown = assertThrows(SecurityException.class, in testUnReportState_requiresPermission() local 112 assertThat(thrown.getMessage()).isEqualTo(EXPECTED_ERROR_MESSAGE); in testUnReportState_requiresPermission() 117 SecurityException thrown = assertThrows(SecurityException.class, in testRequestDisplay_requiresPermission() local 119 assertThat(thrown.getMessage()).isEqualTo(EXPECTED_ERROR_MESSAGE); in testRequestDisplay_requiresPermission() [all …]
|
/cts/tools/vm-tests-tf/src/dot/junit/ |
D | DxTestCase.java | 23 private static void checkError(Class<?> expectedErrorClass, Throwable thrown, in checkError() argument 25 if (expectedErrorClass != null && thrown == null) { in checkError() 27 } else if (expectedErrorClass == null && thrown != null) { in checkError() 28 fail("Unexpected error " + thrown); in checkError() 29 } else if (expectedErrorClass != null && thrown != null) { in checkError() 31 if (!(thrown instanceof java.lang.reflect.InvocationTargetException)) { in checkError() 32 fail("Expected invocation target exception, but got " + thrown); in checkError() 34 thrown = thrown.getCause(); in checkError() 36 if (!expectedErrorClass.equals(thrown.getClass())) { in checkError() 38 thrown.getClass()); in checkError()
|
D | DxAbstractMain.java | 25 private static void checkError(Class<?> expectedErrorClass, Throwable thrown, in checkError() argument 27 if (expectedErrorClass != null && thrown == null) { in checkError() 29 } else if (expectedErrorClass == null && thrown != null) { in checkError() 30 fail("Unexpected error " + thrown, thrown); in checkError() 31 } else if (expectedErrorClass != null && thrown != null) { in checkError() 33 if (!(thrown instanceof java.lang.reflect.InvocationTargetException)) { in checkError() 34 fail("Expected invocation target exception, but got " + thrown, thrown); in checkError() 36 thrown = thrown.getCause(); in checkError() 38 if (!expectedErrorClass.equals(thrown.getClass())) { in checkError() 40 thrown.getClass(), thrown); in checkError()
|
/cts/tests/tests/car_permission_tests/src/android/car/cts/permissiontest/ |
D | CarOccupantZoneManagerPermissionTest.java | 59 SecurityException thrown = assertThrows(SecurityException.class, in testDisplayIdForDriver() local 62 assertThat(thrown.getMessage()).isEqualTo( in testDisplayIdForDriver() 68 SecurityException thrown = assertThrows(SecurityException.class, in testGetAudioZoneIdForOccupant() local 70 assertThat(thrown.getMessage()).isEqualTo( in testGetAudioZoneIdForOccupant() 76 SecurityException thrown = assertThrows(SecurityException.class, in testGetOccupantForAudioZoneId() local 79 assertThat(thrown.getMessage()).isEqualTo( in testGetOccupantForAudioZoneId() 85 SecurityException thrown = assertThrows(SecurityException.class, in testAssignProfileUserToOccupantZone() local 88 assertThat(thrown.getMessage()).isEqualTo(getPermissionFailureMsg()); in testAssignProfileUserToOccupantZone()
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | MatcherUtils.java | 100 Throwable thrown; 103 thrown = null; 105 thrown = t; 107 assertOrRethrow(thrown, exceptionCond);
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | MatcherUtils.java | 118 Throwable thrown; 121 thrown = null; 123 thrown = t; 125 assertOrRethrow(thrown, exceptionCond);
|
/cts/hostsidetests/appsecurity/test-apps/SettingsProviderInvalidKeyTestApp/src/com/android/cts/settingsproviderinvalidkeytestapp/ |
D | SettingsProviderInvalidKeyTest.java | 30 IllegalStateException thrown = expectThrows(IllegalStateException.class, in testLongKeysAreRejected() local 32 assertTrue(thrown.getMessage().contains("adding too many system settings")); in testLongKeysAreRejected()
|
/cts/tests/tests/print/printTestUtilLib/src/android/print/test/ |
D | Utils.java | 82 final Throwable[] thrown = new Throwable[1]; in runOnMainThread() local 90 thrown[0] = t; in runOnMainThread() 100 if (thrown[0] != null) { in runOnMainThread() 101 throw thrown[0]; in runOnMainThread()
|
/cts/tests/tests/media/audio/src/android/media/audio/cts/ |
D | AudioSystemUsageTest.java | 111 UnsupportedOperationException thrown = expectThrows(UnsupportedOperationException.class, in getOutputForAttr_returnsError() local 113 assertThat(thrown).hasMessageThat().contains("Cannot create AudioTrack"); in getOutputForAttr_returnsError() 126 UnsupportedOperationException thrown = expectThrows(UnsupportedOperationException.class, in getInputForAttr_returnsError() local 128 assertThat(thrown).hasMessageThat().contains("Cannot create AudioRecord"); in getInputForAttr_returnsError()
|
/cts/tests/appcloning/src/android/appcloning/cts/ |
D | CrossProfileIntentFilterTest.java | 72 Throwable thrown = assertThrows(RuntimeException.class, () -> { in addCrossProfileIntentFilterForSystemAccessTest() local 78 assertThat(thrown).hasCauseThat().isInstanceOf(SecurityException.class); in addCrossProfileIntentFilterForSystemAccessTest() 79 Throwable cause = Throwables.getCauseAs(thrown, SecurityException.class); in addCrossProfileIntentFilterForSystemAccessTest()
|
/cts/tests/tests/car_permission_tests/src/android/car/cts/permissiontest/wifi/ |
D | CarWifiManagerPermissionTest.java | 58 SecurityException thrown = assertThrows(SecurityException.class, runnable); in expectPermissionException() local 59 assertThat(thrown.getMessage()).isEqualTo("requires " + permission); in expectPermissionException()
|
/cts/tests/tests/car_permission_tests/src/android/car/cts/permissiontest/watchdog/ |
D | CarWatchdogManagerPermissionTest.java | 201 SecurityException thrown = assertThrows(SecurityException.class, runnable); in expectPermissionException() local 202 assertThat(thrown.getMessage()).isEqualTo("requires " + permission); in expectPermissionException() 206 SecurityException thrown = assertThrows(SecurityException.class, runnable); in expectPermissionException() local 208 assertThat(thrown.getMessage()).isEqualTo(exceptionBuilder); in expectPermissionException()
|
/cts/tests/tests/car_permission_tests/src/android/car/cts/permissiontest/input/ |
D | CarInputManagerPermissionTest.java | 77 SecurityException thrown = assertThrows(SecurityException.class, in testInjectKeyEventPermission() local 80 assertThat(thrown.getMessage()).isEqualTo( in testInjectKeyEventPermission()
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | ThreadNetworkTest.java | 136 ExecutionException thrown = assertThrows( in enableThread_disallowThreadNetworkIsSet_failWithFailedPrecondition() local 138 ThreadNetworkException cause = (ThreadNetworkException) thrown.getCause(); in enableThread_disallowThreadNetworkIsSet_failWithFailedPrecondition()
|
/cts/tests/tests/carrierapi/src/android/carrierapi/cts/ |
D | BugreportManagerTest.java | 493 } catch (Throwable thrown) { in assertExceptionThrownForMode() 494 if (!exceptionType.isInstance(thrown)) { in assertExceptionThrownForMode() 495 throw thrown; in assertExceptionThrownForMode()
|
/cts/tests/tests/car/src/android/car/cts/ |
D | CarOccupantZoneManagerTest.java | 422 NullPointerException thrown = assertThrows(NullPointerException.class, in testGetOccupantZoneForNullUser() local 426 .that(thrown).hasMessageThat() in testGetOccupantZoneForNullUser()
|
D | CarAudioManagerTest.java | 1373 NullPointerException thrown = assertThrows(NullPointerException.class, () -> in enableMirrorForAudioZones_withNullList() local 1378 .that(thrown).hasMessageThat().contains("Audio zones to mirror"); in enableMirrorForAudioZones_withNullList()
|
/cts/tools/cts-api-coverage/proto/ |
D | cts_report.proto | 317 // Captures an exception thrown during the test.
|