/system/tools/xsdc/tests/src/com/android/xsdc/tests/ |
D | XmlParserTest.java | 46 assertThat(orderType.getOrderDate(), in testPurchaseSimple() 49 assertThat(orderType.getBillTo().getName(), is("billName")); in testPurchaseSimple() 50 assertThat(orderType.getBillTo().getZip(), is(new BigInteger("1"))); in testPurchaseSimple() 51 assertThat(orderType.getShipTo().get(0).getStreet(), is("street1")); in testPurchaseSimple() 52 assertThat(orderType.getShipTo().get(1).getZip(), in testPurchaseSimple() 68 assertThat(new String(actualStr), is(expectedStr)); in testPurchaseSimple() 79 assertThat(employee.getName(), is("Peter")); in testNestedType() 80 assertThat(employee.getAddress().getCountry(), is("US")); in testNestedType() 81 assertThat(employee.getAddress().getExtra().getLine2(), is("Good Street")); in testNestedType() 92 assertThat(person.getName(), is("Petr")); in testSimpleComplexContent() [all …]
|
/system/tools/aidl/tests/java/src/android/aidl/tests/ |
D | TestServiceClient.java | 22 import static org.junit.Assert.assertThat; 90 assertThat(service.RepeatBoolean(query), is(query)); in testBooleanRepeat() 96 assertThat(service.RepeatChar(query), is(query)); in testCharRepeat() 102 assertThat(service.RepeatByte(query), is(query)); in testByteRepeat() 108 assertThat(service.RepeatInt(query), is(query)); in testIntRepeat() 122 assertThat(service.RepeatInt(query[i]), is(query[i])); in testConstRepeat() 129 assertThat(service.RepeatLong(query), is(query)); in testLongRepeat() 135 assertThat(service.RepeatFloat(query), is(query)); in testFloatRepeat() 141 assertThat(service.RepeatDouble(query), is(query)); in testDoubleRepeat() 147 assertThat(service.RepeatByteEnum(query), is(query)); in testByteEnumRepeat() [all …]
|
D | MapTests.java | 20 import static org.junit.Assert.assertThat; 78 assertThat(readFoo.intEnumArrayMap.size(), is(1)); in testWriteAndThenReadMaps() 79 assertThat(readFoo.intEnumArrayMap.get("Foo"), is(new int[] {IntEnum.FOO})); in testWriteAndThenReadMaps() 81 assertThat(readFoo.intArrayMap.size(), is(1)); in testWriteAndThenReadMaps() 82 assertThat(readFoo.intArrayMap.get("Foo"), is(new int[] {42})); in testWriteAndThenReadMaps() 84 assertThat(readFoo.barMap.containsKey("Foo"), is(true)); in testWriteAndThenReadMaps() 85 assertThat(readFoo.barMap.size(), is(1)); in testWriteAndThenReadMaps() 88 assertThat(readBar.a, is(42)); in testWriteAndThenReadMaps() 89 assertThat(readBar.b, is("Bar")); in testWriteAndThenReadMaps() 92 assertThat(bars.length, is(1)); in testWriteAndThenReadMaps() [all …]
|
D | JavaOnlyImmutableAnnotationTests.java | 20 import static org.junit.Assert.assertThat; 58 assertThat(foo.a, is(foo2.a)); in testReadWriteJavaOnlyImmutableParcelable() 59 assertThat(foo.b.s, is(foo2.b.s)); in testReadWriteJavaOnlyImmutableParcelable() 60 assertThat(foo.c.size(), is(foo.c.size())); in testReadWriteJavaOnlyImmutableParcelable() 61 assertThat(foo.c.get(0).s, is(foo2.c.get(0).s)); in testReadWriteJavaOnlyImmutableParcelable() 62 assertThat(foo.c.size(), is(foo.c.size())); in testReadWriteJavaOnlyImmutableParcelable() 63 assertThat(foo.d.get("key").s, is(foo2.d.get("key").s)); in testReadWriteJavaOnlyImmutableParcelable() 64 assertThat(foo.e.length, is(foo.e.length)); in testReadWriteJavaOnlyImmutableParcelable() 67 assertThat(foo.e[i].s, is(foo2.e[i].s)); in testReadWriteJavaOnlyImmutableParcelable() 70 assertThat(foo.u.getNum(), is(foo2.u.getNum())); in testReadWriteJavaOnlyImmutableParcelable() [all …]
|
D | ExtensionTests.java | 22 import static org.junit.Assert.assertThat; 102 assertThat(ep2.a, is(ep.a)); in testRepeatExtendableParcelable() 103 assertThat(ep2.b, is(ep.b)); in testRepeatExtendableParcelable() 106 assertThat(retExt.a, is(ext.a)); in testRepeatExtendableParcelable() 107 assertThat(retExt.b, is(ext.b)); in testRepeatExtendableParcelable() 113 assertThat(vep.ext.getParcelable(VintfParcelable.class), is(vp)); in testVintfParcelableHolderCanContainVintfParcelable() 119 assertThat(vep.ext.getParcelable(VintfParcelable.class), is(nullValue())); in testVintfParcelableHolderCannotContainNonVintfParcelable() 125 assertThat(vep.ext.getParcelable(UnstableParcelable.class), is(nullValue())); in testVintfParcelableHolderCannotContainUnstableParcelable() 131 assertThat(sep.ext.getParcelable(VintfParcelable.class), is(vp)); in testStableParcelableHolderCanContainVintfParcelable() 137 assertThat(sep.ext.getParcelable(NonVintfParcelable.class), is(sp)); in testStableParcelableHolderCanContainNonVintfParcelable() [all …]
|
D | GenericTests.java | 20 import static org.junit.Assert.assertThat; 62 assertThat(service.getPair().mFirst, is(15)); in testGeneric() 63 assertThat(service.getPair().mSecond, is("My")); in testGeneric() 65 assertThat(service.getPair2().mFirst.a, is(15)); in testGeneric() 66 assertThat(service.getPair2().mSecond.a, is(16)); in testGeneric() 68 assertThat(service.getPair3().mFirst, is(15)); in testGeneric() 69 assertThat(service.getPair3().mSecond, is(IntEnum.BAR)); in testGeneric()
|
D | TestVersionedInterface.java | 21 import static org.junit.Assert.assertThat; 51 assertThat(service.getInterfaceVersion(), is(1)); in testGetInterfaceVersion() 56 assertThat(service.getInterfaceHash(), is("9e7be1859820c59d9d55dd133e71a3687b5d2e5b")); in testGetInterfaceHash() 71 assertThat(service.acceptUnionAndReturnString(BazUnion.intNum(42)), is("42")); in testOldServerAcceptsUnionWithOldField() 88 assertThat(length, is(foos.length)); in testArrayOfPacelableWithNewField() 97 assertThat(ret, is(43)); in testReadDataCorrectlyAfterParcelableWithNewField()
|
/system/apex/tests/src/com/android/tests/apex/ |
D | ApexRollbackTests.java | 19 import static com.google.common.truth.Truth.assertThat; 112 assertThat(device.setProperty("persist.debug.trigger_watchdog.apex", in testAutomaticBootLoopRecovery() 115 assertThat(error).isNull(); in testAutomaticBootLoopRecovery() 119 assertThat(sessionIdToCheck).isNotEmpty(); in testAutomaticBootLoopRecovery() 133 assertThat(activatedApexes).contains(ctsShimV1); in testAutomaticBootLoopRecovery() 134 assertThat(activatedApexes).doesNotContain(ctsShimV2); in testAutomaticBootLoopRecovery() 139 assertThat(sessionInfo).contains("revertReason: zygote"); in testAutomaticBootLoopRecovery() 154 assertThat(device.setProperty("persist.debug.trigger_reboot_after_activation", in testSessionNotRevertedWithCheckpointingDisabled() 156 assertThat(device.setProperty("debug.trigger_reboot_once_after_activation", in testSessionNotRevertedWithCheckpointingDisabled() 160 assertThat(error).isNull(); in testSessionNotRevertedWithCheckpointingDisabled() [all …]
|
D | SharedLibsApexTest.java | 19 import static com.google.common.truth.Truth.assertThat; 196 assertThat(runAsResult).isEqualTo("FOO_VERSION_1 SHARED_LIB_VERSION_X"); in testInstallAndRunDefaultApexs() 199 assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X"); in testInstallAndRunDefaultApexs() 203 assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X"); in testInstallAndRunDefaultApexs() 207 assertThat(runAsResult).isEqualTo("PONY_VERSION_1 SHARED_LIB_VERSION_Z"); in testInstallAndRunDefaultApexs() 221 assertThat(runAsResult).isEqualTo("FOO_VERSION_2 SHARED_LIB_VERSION_Y"); in testInstallAndRunDefaultApexs() 224 assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y"); in testInstallAndRunDefaultApexs() 228 assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y"); in testInstallAndRunDefaultApexs() 268 assertThat(runAsResult).isEqualTo("FOO_VERSION_1 SHARED_LIB_VERSION_X"); in testInstallAndRunOptimizedApexs() 271 assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X"); in testInstallAndRunOptimizedApexs() [all …]
|
D | ApexdHostTest.java | 19 import static com.google.common.truth.Truth.assertThat; 83 assertThat(getDevice().pushFile(mHostUtils.getTestFile("apex.apexd_test_v2.apex"), in testOrphanedApexIsNotActivated() 91 assertThat(activeApexes).doesNotContain(testApex); in testOrphanedApexIsNotActivated() 104 assertThat(getDevice().pushFile(mHostUtils.getTestFile(testApexFile), in testApexWithoutPbIsNotActivated() 112 assertThat(activeApexes).doesNotContain(testApex); in testApexWithoutPbIsNotActivated() 143 assertThat(activeApexes).contains(testApex); in testRemountApex() 173 assertThat(activeApexes).contains(new ITestDevice.ApexInfo( in testApexWithoutPbIsNotActivated_ProductPartitionHasOlderVersion() 175 assertThat(activeApexes).doesNotContain(new ITestDevice.ApexInfo( in testApexWithoutPbIsNotActivated_ProductPartitionHasOlderVersion() 214 assertThat(activeApexes).contains(new ITestDevice.ApexInfo( in testApexWithoutPbIsNotActivated_ProductPartitionHasNewerVersion() 216 assertThat(activeApexes).doesNotContain(new ITestDevice.ApexInfo( in testApexWithoutPbIsNotActivated_ProductPartitionHasNewerVersion() [all …]
|
/system/apex/tests/app/src/com/android/tests/apex/app/ |
D | ApexCompressionTests.java | 19 import static com.google.common.truth.Truth.assertThat; 78 assertThat(pi).isNotNull(); in testDecompressedApexIsConsideredFactory() 79 assertThat(pi.isApex).isTrue(); in testDecompressedApexIsConsideredFactory() 80 assertThat(pi.packageName).isEqualTo(COMPRESSED_APEX_PACKAGE_NAME); in testDecompressedApexIsConsideredFactory() 81 assertThat(pi.getLongVersionCode()).isEqualTo(1); in testDecompressedApexIsConsideredFactory() 83 assertThat(isFactoryPackage).isTrue(); in testDecompressedApexIsConsideredFactory() 102 assertThat(pi).isNotNull(); in testCapexToApexSwitch() 103 assertThat(pi.isApex).isTrue(); in testCapexToApexSwitch() 104 assertThat(pi.packageName).isEqualTo(COMPRESSED_APEX_PACKAGE_NAME); in testCapexToApexSwitch() 105 assertThat(pi.getLongVersionCode()).isEqualTo(1); in testCapexToApexSwitch() [all …]
|
/system/bt/gd/cert/ |
D | cert_self_test_lib.py | 28 from cert.truth import assertThat 205 assertThat(True).isTrue() 206 assertThat(False).isFalse() 211 assertThat(False).isTrue() 219 assertThat(True).isFalse() 226 assertThat("this").isEqualTo("this") 227 assertThat("this").isNotEqualTo("that") 228 assertThat(None).isNone() 229 assertThat("this").isNotNone() 234 assertThat("this").isEqualTo("that") [all …]
|
D | py_le_acl_manager.py | 25 from cert.truth import assertThat 57 assertThat(self.connection_event_stream).emits(disconnection_complete) 89 assertThat(self.incoming_connection_event_stream).isNone() 102 assertThat(token in self.outgoing_connection_event_streams).isTrue() 108 assertThat(self.next_token in self.outgoing_connection_event_streams).isFalse() 117 assertThat(event_stream).emits(connection_complete) 130 assertThat(self.incoming_connection_event_stream).isNotNone() 136 assertThat(self.outgoing_connection_event_streams[token]).isNotNone()
|
D | py_acl_manager.py | 24 from cert.truth import assertThat 47 assertThat(self.connection_event_stream).emits(disconnection_complete) 69 assertThat(self.incoming_connection_event_stream).isNone() 74 assertThat(self.outgoing_connection_event_stream).isNone() 81 assertThat(event_stream).emits(connection_complete) 88 assertThat(self.incoming_connection_event_stream).isNotNone() 94 assertThat(self.outgoing_connection_event_stream).isNotNone()
|
/system/tools/hidl/hidl2aidl/test/ |
D | TranslateJavaTest.java | 20 import static org.junit.Assert.assertThat; 34 assertThat(source.str, is(dest.str)); in OnlyIn10() 43 assertThat(source.str, is(dest.str)); in OnlyIn11() 52 assertThat(source.a, is(dest.a)); in OverrideMe() 62 assertThat(source.v1_0.inner.a, is(dest.inner.a)); in Outer() 71 assertThat(source.a, is(dest.a)); in OuterInner() 82 assertThat(source.reference.reference.a, is(dest.a)); in NameCollision() 83 assertThat(source.reference.b, is(dest.b)); in NameCollision() 84 assertThat(source.c, is(dest.c)); in NameCollision() 94 assertThat(source.type, is(dest.type)); in IFooBigStruct() [all …]
|
/system/apex/tests/src/com/android/tests/apex/host/ |
D | ApexCompressionTests.java | 19 import static com.google.common.truth.Truth.assertThat; 158 assertThat(files).contains(COMPRESSED_APEX_PACKAGE_NAME + "@1" + DECOMPRESSED_APEX_SUFFIX); in testCompressedApexIsDecompressedAndActivated() 168 assertThat(decompressedFileBytes).isEqualTo(originalApexFileBytes); in testCompressedApexIsDecompressedAndActivated() 172 assertThat(files).doesNotContain( in testCompressedApexIsDecompressedAndActivated() 183 assertThat(files).contains(COMPRESSED_APEX_PACKAGE_NAME + "@1" + DECOMPRESSED_APEX_SUFFIX); in testDecompressedApexSurvivesReboot() 194 assertThat(files).contains(COMPRESSED_APEX_PACKAGE_NAME + "@1" + DECOMPRESSED_APEX_SUFFIX); in testDecompressedApexSurvivesReboot() 200 assertThat(decompressedFileBytes).isEqualTo(decompressedFileBytesAfterReboot); in testDecompressedApexSurvivesReboot() 218 assertThat(lastModifiedTime1).isEqualTo(lastModifiedTime2); in testDecompressionDoesNotHappenOnEveryReboot() 228 assertThat(files).contains(COMPRESSED_APEX_PACKAGE_NAME + "@1" + DECOMPRESSED_APEX_SUFFIX); in testHigherVersionOnSystemTriggerDecompression() 238 assertThat(files).contains(COMPRESSED_APEX_PACKAGE_NAME + "@2" + DECOMPRESSED_APEX_SUFFIX); in testHigherVersionOnSystemTriggerDecompression() [all …]
|
/system/bt/gd/l2cap/classic/cert/ |
D | l2cap_test.py | 33 from cert.truth import assertThat 108 assertThat(cert_channel.is_configured()).isTrue() 135 assertThat(cert_channel).emits(L2capMatchers.Data(b'abc')) 145 … assertThat(cert_channel).emitsNone(L2capMatchers.SFrame(req_seq=4), timeout=timedelta(seconds=1)) 160 assertThat(cert_channel).emits(L2capMatchers.IFrame(tx_seq=0, payload=b'abc' * 34)) 183 assertThat(cert_channel).emits(L2capMatchers.Data(b'hello')) 205 assertThat(cert_channel).emits(L2capMatchers.Data(b'a' * 48)) 228 … assertThat(self.cert_l2cap.get_control_channel()).emitsNone(L2capMatchers.ConfigurationResponse()) 243 … assertThat(self.cert_l2cap.get_control_channel()).emits(L2capMatchers.ConfigurationResponse()) 275 …assertThat(self.cert_l2cap.get_control_channel()).emits(L2capMatchers.ConfigurationResponse(), at_… [all …]
|
D | l2cap_performance_test.py | 20 from cert.truth import assertThat 48 assertThat(cert_channel).emits( 72 … assertThat(cert_channel).emits(L2capMatchers.Data(b'a' * mtu), at_least_times=batch_size) 85 assertThat(dut_channel).emits( 113 …assertThat(cert_channel).emits(L2capMatchers.IFrame(payload=b'a' * mtu), at_least_times=tx_window_… 143 assertThat(cert_channel).emits(L2capMatchers.SFrame(req_seq=(i + 1) % 64)) 151 assertThat(duration).isWithin(timedelta(seconds=2)) 155 assertThat(duration).isWithin(timedelta(seconds=2)) 159 assertThat(duration).isWithin(timedelta(seconds=5)) 177 assertThat(dut_channel).emits(L2capMatchers.PacketPayloadRawData(data)) [all …]
|
/system/bt/gd/l2cap/le/cert/ |
D | le_l2cap_test.py | 17 from cert.truth import assertThat 140 assertThat(cert_channel).emits(L2capMatchers.Data(b'hello' * 40)) 147 assertThat(dut_channel).emits(L2capMatchers.PacketPayloadRawData(b'\x19\x26\x08\x17')) 165 …assertThat(self.cert_l2cap.get_control_channel()).emits(L2capMatchers.LeConnectionParameterUpdateR… 176 assertThat(self.cert_l2cap.get_control_channel()).emits( 189 assertThat(self.cert_l2cap.get_control_channel()).emits( 201 assertThat(self.cert_l2cap.get_control_channel()).emits(L2capMatchers.LeCommandReject()) 214 assertThat(cert_channel).emits( 225 assertThat(cert_channel).emits(L2capMatchers.FirstLeIFrame(b'hello' * 40, sdu_size=200)) 233 assertThat(cert_channel).emits(L2capMatchers.FirstLeIFrame(b'hello' * 40, sdu_size=200)) [all …]
|
/system/bt/gd/hci/cert/ |
D | acl_manager_test.py | 18 from cert.truth import assertThat 50 assertThat(cert_acl).emits(lambda packet: b'SomeMoreAclData' in packet.payload) 51 assertThat(dut_acl).emits(lambda packet: b'SomeAclData' in packet.payload) 66 assertThat(cert_acl).emits(lambda packet: b'SomeMoreAclData' in packet.payload) 67 assertThat(dut_acl).emits(lambda packet: b'SomeAclData' in packet.payload) 81 assertThat(dut_acl).emitsNone() 86 assertThat(dut_acl).emits(lambda packet: b'SomeAclData' in packet.payload) 101 assertThat(cert_acl).emits(lambda packet: b'SomeMoreAclData' in packet.payload) 102 assertThat(dut_acl).emits(lambda packet: b'SomeAclData' in packet.payload) 118 assertThat(dut_acl).emits(lambda packet: b'Hello!' in packet.payload,
|
D | controller_test.py | 20 from cert.truth import assertThat 35 assertThat(cert_address).isNotEqualTo(dut_address) 44 assertThat(dut_name).isEqualTo(b'ImTheDUT') 45 assertThat(cert_name).isEqualTo(b'ImTheCert')
|
/system/bt/gd/hal/cert/ |
D | simple_hal_test.py | 21 from cert.truth import assertThat 59 assertThat(self.dut_hal.get_hci_event_stream()).emits( 69 assertThat(self.dut_hal.get_hci_event_stream()).emits(HciMatchers.LoopbackOf(command)) 78 … assertThat(self.dut_hal.get_hci_event_stream()).emits(lambda packet: b'\x02\x0f' in packet.payload 99 …assertThat(self.dut_hal.get_hci_event_stream()).emits(lambda packet: b'Im_A_Cert' in packet.payloa… 121 … assertThat(self.cert_hal.get_acl_stream()).emits(lambda packet: b'SomeAclData' in packet.payload) 122 …assertThat(self.dut_hal.get_acl_stream()).emits(lambda packet: b'SomeMoreAclData' in packet.payloa… 140 assertThat(self.cert_hal.get_hci_event_stream()).emits(HciMatchers.LeConnectionComplete()) 141 assertThat(self.dut_hal.get_hci_event_stream()).emits(HciMatchers.LeConnectionComplete())
|
/system/bt/gd/security/cert/ |
D | security_test.py | 23 from cert.truth import assertThat 349 assertThat(False).isTrue() 374 assertThat(len(oob_data)).isEqualTo(4) 379 assertThat(has192C).isTrue() 380 assertThat(has192R).isTrue() 381 assertThat(has256C).isFalse() 382 assertThat(has256R).isFalse() 386 assertThat(len(oob_data)).isEqualTo(4) 391 assertThat(has192C).isFalse() 392 assertThat(has192R).isFalse() [all …]
|
D | le_security_test.py | 27 from cert.truth import assertThat 147 assertThat(self.dut_security.get_bond_stream()).emits( 163 assertThat(self.dut_security.get_ui_stream()).emits( 174 assertThat(self.cert_security.get_ui_stream()).emits( 178 assertThat(self.dut_security.get_bond_stream()).emits( 207 assertThat(self.cert_security.get_ui_stream()).emits( 219 assertThat(self.dut_security.get_bond_stream()).emits( 243 assertThat(self.dut_security.get_ui_stream()).emits( 254 assertThat(self.dut_security.get_bond_stream()).emits( 279 assertThat(self.dut_security.get_ui_stream()).emits( [all …]
|
D | cert_security.py | 26 from cert.truth import assertThat 158 assertThat(self._hci_event_stream).emits(complete_capture) 169 assertThat(self._hci_event_stream).emits(complete_capture) 181 assertThat(self._hci_event_stream).emits(complete_capture) 192 assertThat(self._hci_event_stream).emits(complete_capture) 203 …assertThat(self._hci_event_stream).emits(HciMatchers.EventWithCode(hci_packets.EventCode.USER_PASS… 244 assertThat(self._hci_event_stream).emits(HciMatchers.PinCodeRequest()) 267 assertThat(self._hci_event_stream).emits( 278 assertThat(self._hci_event_stream).emits( 285 assertThat(self._hci_event_stream).emits(HciMatchers.IoCapabilityRequest()) [all …]
|