Home
last modified time | relevance | path

Searched refs:assertThat (Results 1 – 25 of 38) sorted by relevance

12

/system/tools/aidl/tests/java_app/src/android/aidl/tests/
DTestServiceClient.java21 import static org.junit.Assert.assertThat;
79 assertThat(service.RepeatBoolean(query), is(query)); in testBooleanRepeat()
85 assertThat(service.RepeatChar(query), is(query)); in testCharRepeat()
91 assertThat(service.RepeatByte(query), is(query)); in testByteRepeat()
97 assertThat(service.RepeatInt(query), is(query)); in testIntRepeat()
111 assertThat(service.RepeatInt(query[i]), is(query[i])); in testConstRepeat()
118 assertThat(service.RepeatLong(query), is(query)); in testLongRepeat()
124 assertThat(service.RepeatFloat(query), is(query)); in testFloatRepeat()
130 assertThat(service.RepeatDouble(query), is(query)); in testDoubleRepeat()
136 assertThat(service.RepeatByteEnum(query), is(query)); in testByteEnumRepeat()
[all …]
DExtensionTests.java19 import static org.junit.Assert.assertThat;
68 assertThat(vep.ext.setParcelable(vp), is(true)); in testVintfParcelableHolderCanContainVintfParcelable()
69 assertThat(vep.ext.getParcelable(VintfParcelable.class), is(vp)); in testVintfParcelableHolderCanContainVintfParcelable()
74 assertThat(vep.ext.setParcelable(sp), is(false)); in testVintfParcelableHolderCannotContainNonVintfParcelable()
75 assertThat(vep.ext.getParcelable(VintfParcelable.class), is(nullValue())); in testVintfParcelableHolderCannotContainNonVintfParcelable()
80 assertThat(vep.ext.setParcelable(up), is(false)); in testVintfParcelableHolderCannotContainUnstableParcelable()
81 assertThat(vep.ext.getParcelable(UnstableParcelable.class), is(nullValue())); in testVintfParcelableHolderCannotContainUnstableParcelable()
86 assertThat(sep.ext.setParcelable(vp), is(true)); in testStableParcelableHolderCanContainVintfParcelable()
87 assertThat(sep.ext.getParcelable(VintfParcelable.class), is(vp)); in testStableParcelableHolderCanContainVintfParcelable()
92 assertThat(sep.ext.setParcelable(sp), is(true)); in testStableParcelableHolderCanContainNonVintfParcelable()
[all …]
DMapTests.java19 import static org.junit.Assert.assertThat;
64 assertThat(readFoo.barMap.containsKey("Foo"), is(true)); in testWriteAndThenReadMaps()
65 assertThat(readFoo.barMap.size(), is(1)); in testWriteAndThenReadMaps()
68 assertThat(readBar.a, is(42)); in testWriteAndThenReadMaps()
69 assertThat(readBar.b, is("Bar")); in testWriteAndThenReadMaps()
71 assertThat(readFoo.stringMap.size(), is(1)); in testWriteAndThenReadMaps()
72 assertThat(readFoo.stringMap.get("Foo"), is("Bar")); in testWriteAndThenReadMaps()
74 assertThat(readFoo.interfaceMap.size(), is(1)); in testWriteAndThenReadMaps()
75 assertThat(readFoo.interfaceMap.get("Foo"), is(intf)); in testWriteAndThenReadMaps()
77 assertThat(readFoo.ibinderMap.size(), is(1)); in testWriteAndThenReadMaps()
[all …]
DImmutableAnnotationTests.java20 import static org.junit.Assert.assertThat;
57 assertThat(foo.a, is(foo2.a)); in testReadWriteImmutableParcelable()
58 assertThat(foo.b.s, is(foo2.b.s)); in testReadWriteImmutableParcelable()
59 assertThat(foo.c.size(), is(foo.c.size())); in testReadWriteImmutableParcelable()
60 assertThat(foo.c.get(0).s, is(foo2.c.get(0).s)); in testReadWriteImmutableParcelable()
61 assertThat(foo.c.size(), is(foo.c.size())); in testReadWriteImmutableParcelable()
62 assertThat(foo.d.get("key").s, is(foo2.d.get("key").s)); in testReadWriteImmutableParcelable()
63 assertThat(foo.e.length, is(foo.e.length)); in testReadWriteImmutableParcelable()
66 assertThat(foo.e[i].s, is(foo2.e[i].s)); in testReadWriteImmutableParcelable()
DTestVersionedInterface.java21 import static org.junit.Assert.assertThat;
49 assertThat(service.getInterfaceVersion(), is(1)); in testGetInterfaceVersion()
54 assertThat(service.getInterfaceHash(), is("fcd4f9c806cbc8af3694d569fd1de1ecc8cf7d22")); in testGetInterfaceHash()
DGenericTests.java19 import static org.junit.Assert.assertThat;
53 assertThat(service.getPair().mFirst, is(15)); in testGeneric()
54 assertThat(service.getPair().mSecond, is("My")); in testGeneric()
DNullableTests.java20 import static org.junit.Assert.assertThat;
84 assertThat(callback, is(notNullValue())); in testNullableIInterface()
87 assertThat(callback, is(nullValue())); in testNullableIInterface()
/system/apex/tests/src/com/android/tests/apex/
DApexRollbackTests.java19 import static com.google.common.truth.Truth.assertThat;
101 assertThat(device.setProperty("persist.debug.trigger_watchdog.apex", in testAutomaticBootLoopRecovery()
104 assertThat(error).isNull(); in testAutomaticBootLoopRecovery()
108 assertThat(sessionIdToCheck).isNotEmpty(); in testAutomaticBootLoopRecovery()
122 assertThat(activatedApexes).contains(ctsShimV1); in testAutomaticBootLoopRecovery()
123 assertThat(activatedApexes).doesNotContain(ctsShimV2); in testAutomaticBootLoopRecovery()
128 assertThat(sessionInfo).contains("revertReason: zygote"); in testAutomaticBootLoopRecovery()
143 assertThat(device.setProperty("persist.debug.trigger_reboot_after_activation", in testSessionNotRevertedWithCheckpointingDisabled()
145 assertThat(device.setProperty("debug.trigger_reboot_once_after_activation", in testSessionNotRevertedWithCheckpointingDisabled()
149 assertThat(error).isNull(); in testSessionNotRevertedWithCheckpointingDisabled()
[all …]
DApexdHostTest.java19 import static com.google.common.truth.Truth.assertThat;
68 assertThat(getDevice().pushFile(mTestUtils.getTestFile("apex.apexd_test_v2.apex"), in testOrphanedApexIsNotActivated()
76 assertThat(activeApexes).doesNotContain(testApex); in testOrphanedApexIsNotActivated()
89 assertThat(getDevice().pushFile(mTestUtils.getTestFile(testApexFile), in testApexWithoutPbIsNotActivated()
97 assertThat(activeApexes).doesNotContain(testApex); in testApexWithoutPbIsNotActivated()
128 assertThat(activeApexes).contains(testApex); in testRemountApex()
158 assertThat(activeApexes).contains(new ITestDevice.ApexInfo( in testApexWithoutPbIsNotActivated_ProductPartitionHasOlderVersion()
160 assertThat(activeApexes).doesNotContain(new ITestDevice.ApexInfo( in testApexWithoutPbIsNotActivated_ProductPartitionHasOlderVersion()
199 assertThat(activeApexes).contains(new ITestDevice.ApexInfo( in testApexWithoutPbIsNotActivated_ProductPartitionHasNewerVersion()
201 assertThat(activeApexes).doesNotContain(new ITestDevice.ApexInfo( in testApexWithoutPbIsNotActivated_ProductPartitionHasNewerVersion()
[all …]
/system/tools/xsdc/tests/src/com/android/xsdc/tests/
DXmlParserTest.java64 assertThat(name, is("billName")); in testPurchaseSimple()
65 assertThat(zip, is(new BigInteger("1"))); in testPurchaseSimple()
66 assertThat(street, is("street1")); in testPurchaseSimple()
67 assertThat(largeZip, is(new BigInteger("-7922816251426433759"))); in testPurchaseSimple()
68 assertThat(orderDate, in testPurchaseSimple()
98 assertThat(name, is("Peter")); in testNestedType()
99 assertThat(country, is("US")); in testNestedType()
100 assertThat(line2, is("Good Street")); in testNestedType()
132 assertThat(name, is("Petr")); in testSimpleComplexContent()
133 assertThat(usStreet, is("street fighter")); in testSimpleComplexContent()
[all …]
/system/bt/gd/cert/
Dcert_self_test.py31 from cert.truth import assertThat
208 assertThat(True).isTrue()
209 assertThat(False).isFalse()
213 assertThat(False).isTrue()
220 assertThat(True).isFalse()
226 assertThat("this").isEqualTo("this")
227 assertThat("this").isNotEqualTo("that")
228 assertThat(None).isNone()
229 assertThat("this").isNotNone()
233 assertThat("this").isEqualTo("that")
[all …]
Dpy_acl_manager.py24 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()
Dpy_le_acl_manager.py25 from cert.truth import assertThat
57 assertThat(self.connection_event_stream).emits(disconnection_complete)
89 assertThat(self.incoming_connection_event_stream).isNone()
102 assertThat(self.next_token in self.outgoing_connection_event_streams).isFalse()
111 assertThat(event_stream).emits(connection_complete)
124 assertThat(self.incoming_connection_event_stream).isNotNone()
130 assertThat(self.outgoing_connection_event_streams[token]).isNotNone()
/system/bt/gd/l2cap/classic/cert/
Dl2cap_test.py32 from cert.truth import assertThat
107 assertThat(cert_channel.is_configured()).isTrue()
134 assertThat(cert_channel).emits(L2capMatchers.Data(b'abc'))
144assertThat(cert_channel).emitsNone(L2capMatchers.SFrame(req_seq=4), timeout=timedelta(seconds=1))
159 assertThat(cert_channel).emits(L2capMatchers.IFrame(tx_seq=0, payload=b'abc' * 34))
182 assertThat(cert_channel).emits(L2capMatchers.Data(b'hello'))
204 assertThat(cert_channel).emits(L2capMatchers.Data(b'a' * 48))
227assertThat(self.cert_l2cap.get_control_channel()).emitsNone(L2capMatchers.ConfigurationResponse())
242assertThat(self.cert_l2cap.get_control_channel()).emits(L2capMatchers.ConfigurationResponse())
274assertThat(self.cert_l2cap.get_control_channel()).emits(L2capMatchers.ConfigurationResponse(), at_…
[all …]
Dl2cap_performance_test.py20 from cert.truth import assertThat
48 assertThat(cert_channel).emits(
72assertThat(cert_channel).emits(L2capMatchers.Data(b'a' * mtu), at_least_times=batch_size)
85 assertThat(dut_channel).emits(
113assertThat(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/
Dle_l2cap_test.py17 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'))
165assertThat(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 …]
Dcert_le_l2cap.py20 from cert.truth import assertThat
58 assertThat(self._scid).isNotEqualTo(1)
61assertThat(self._control_channel).emits(L2capMatchers.LeDisconnectionResponse(self._scid, self._dc…
64assertThat(self._control_channel).emits(L2capMatchers.LeDisconnectionRequest(self._dcid, self._sci…
113 assertThat(self.control_channel).emits(response)
125 assertThat(self.control_channel).emits(response)
132 assertThat(self.control_channel).emits(request)
142 assertThat(self.control_channel).emits(request)
148 assertThat(self.control_channel).emits(L2capMatchers.LeFlowControlCredit(channel._dcid))
Ddual_l2cap_test.py17 from cert.truth import assertThat
153 assertThat(cert_channel).emits(L2capMatchers.Data(b'abc'))
156 assertThat(le_cert_channel).emits(L2capMatchers.FirstLeIFrame(b'hello', sdu_size=5))
159 assertThat(le_dut_channel).emits(L2capMatchers.PacketPayloadRawData(b'\x19\x26\x08\x17'))
178 assertThat(cert_channel).emits(L2capMatchers.Data(b'abc'))
181 assertThat(le_cert_channel).emits(L2capMatchers.FirstLeIFrame(b'hello', sdu_size=5))
184 assertThat(le_dut_channel).emits(L2capMatchers.PacketPayloadRawData(b'\x19\x26\x08\x17'))
/system/bt/gd/hci/cert/
Dacl_manager_test.py18 from cert.truth import assertThat
50 assertThat(cert_acl).emits(lambda packet: b'SomeMoreAclData' in packet.data)
51 assertThat(dut_acl).emits(lambda packet: b'SomeAclData' in packet.payload)
66 assertThat(cert_acl).emits(lambda packet: b'SomeMoreAclData' in packet.data)
67 assertThat(dut_acl).emits(lambda packet: b'SomeAclData' in packet.payload)
82 assertThat(cert_acl).emits(lambda packet: b'SomeMoreAclData' in packet.data)
83 assertThat(dut_acl).emits(lambda packet: b'SomeAclData' in packet.payload)
99 assertThat(dut_acl).emits(lambda packet: b'Hello!' in packet.payload,
Dcontroller_test.py20 from cert.truth import assertThat
35 assertThat(cert_address).isNotEqualTo(dut_address)
46 assertThat(dut_feature_response1.page).isNotEqualTo(dut_feature_response0.page)
54 assertThat(dut_name).isEqualTo(b'ImTheDUT')
55 assertThat(cert_name).isEqualTo(b'ImTheCert')
Ddirect_hci_test.py25 from cert.truth import assertThat
75assertThat(self.dut_hci.get_event_stream()).emits(lambda packet: looped_bytes in packet.event)
84 assertThat(self.dut_hci.get_event_stream()).emits(
151assertThat(self.dut_hci.get_le_event_stream()).emits(lambda packet: b'Im_A_Cert' in packet.event)
161 assertThat(self.cert_hal.get_hci_event_stream()).emits(cert_conn_complete_capture)
165 assertThat(self.dut_hci.get_le_event_stream()).emits(dut_conn_complete_capture)
240 assertThat(self.dut_hci.get_event_stream()).emits(
251 assertThat(self.cert_hal.get_acl_stream()).emits(
253 assertThat(self.dut_hci.get_raw_acl_stream()).emits(
309 assertThat(self.cert_hal.get_hci_event_stream()).emits(cert_connection_complete_capture)
[all …]
/system/bt/gd/security/cert/
Dle_security_test.py26 from cert.truth import assertThat
135 assertThat(self.dut_security.get_bond_stream()).emits(
151 assertThat(self.dut_security.get_ui_stream()).emits(
162 assertThat(self.cert_security.get_ui_stream()).emits(
166 assertThat(self.dut_security.get_bond_stream()).emits(
195assertThat(self.cert_security.get_ui_stream()).emits(SecurityMatchers.UiMsg(UiMsgType.DISPLAY_PAIR…
206assertThat(self.dut_security.get_bond_stream()).emits(SecurityMatchers.BondMsg(BondMsgType.DEVICE_…
229assertThat(self.dut_security.get_ui_stream()).emits(SecurityMatchers.UiMsg(UiMsgType.DISPLAY_PAIRI…
239assertThat(self.dut_security.get_bond_stream()).emits(SecurityMatchers.BondMsg(BondMsgType.DEVICE_…
263assertThat(self.dut_security.get_ui_stream()).emits(SecurityMatchers.UiMsg(UiMsgType.DISPLAY_PAIRI…
[all …]
Dcert_security.py25 from cert.truth import assertThat
149 assertThat(self._hci_event_stream).emits(lambda msg: b'\x0e\x04\x01\x56\x0c' in msg.event)
156 assertThat(self._hci_event_stream).emits(HciMatchers.LinkKeyRequest())
160 assertThat(self._hci_event_stream).emits(HciMatchers.IoCapabilityRequest())
166 assertThat(self._hci_event_stream).emits(HciMatchers.UserConfirmationRequest())
172 assertThat(self._hci_event_stream).emits(HciMatchers.SimplePairingComplete())
174 assertThat(self._hci_event_stream).emits(HciMatchers.LinkKeyNotification())
180 assertThat(self._hci_event_stream).emits(HciMatchers.SimplePairingComplete())
/system/bt/gd/neighbor/cert/
Dneighbor_test.py22 from cert.truth import assertThat
54assertThat(self.cert_hci.get_event_stream()).emits(HciMatchers.CommandComplete(OpCode.WRITE_LOCAL_…
65assertThat(session).emits(NeighborMatchers.InquiryResult(self.cert_address), timeout=timedelta(sec…
76 assertThat(session).emits(
96 assertThat(session).emits(
/system/bt/gd/hal/cert/
Dsimple_hal_test.py21 from cert.truth import assertThat
68 assertThat(hci_event_stream).emitsNone(timeout=timedelta(seconds=1))
78assertThat(hci_event_stream).emits(lambda packet: bytes(event.Serialize()) in packet.payload)
89assertThat(hci_event_stream).emits(lambda packet: bytes(command.Serialize()) in packet.payload)
99 assertThat(hci_event_stream).emits(lambda packet: b'\x02\x0f' in packet.payload
157 assertThat(hci_event_stream).emits(lambda packet: b'Im_A_Cert' in packet.payload)
250 assertThat(cert_hci_event_stream).emits(payload_handle)
253 assertThat(hci_event_stream).emits(payload_handle)
262 assertThat(cert_acl_data_stream).emits(lambda packet: b'SomeAclData' in packet.payload)
263 assertThat(acl_data_stream).emits(lambda packet: b'SomeMoreAclData' in packet.payload)

12