/system/bt/packet/tests/avrcp/ |
D | get_capabilities_packet_test.cc | 57 auto builder = GetCapabilitiesResponseBuilder::MakeCompanyIdBuilder(0x000000); in TEST() local 58 ASSERT_EQ(builder->size(), 15u); in TEST() 59 builder->AddCompanyId(0x000001); in TEST() 60 ASSERT_EQ(builder->size(), 18u); in TEST() 61 builder->AddCompanyId(0x000002); in TEST() 62 ASSERT_EQ(builder->size(), 21u); in TEST() 64 builder = GetCapabilitiesResponseBuilder::MakeEventsSupportedBuilder( in TEST() 66 ASSERT_EQ(builder->size(), 13u); in TEST() 67 builder->AddEvent(Event::TRACK_CHANGED); in TEST() 68 ASSERT_EQ(builder->size(), 14u); in TEST() [all …]
|
D | get_folder_items_packet_test.cc | 29 auto builder = GetFolderItemsResponseBuilder::MakePlayerListBuilder( in TEST() local 32 ASSERT_EQ(builder->size(), get_folder_items_error_response.size()); in TEST() 35 builder->AddMediaPlayer(player); in TEST() 36 ASSERT_EQ(builder->size(), get_folder_items_media_player_response.size()); in TEST() 40 auto builder = GetFolderItemsResponseBuilder::MakePlayerListBuilder( in TEST() local 43 builder->AddMediaPlayer(player); in TEST() 46 builder->Serialize(test_packet); in TEST() 59 auto builder = GetFolderItemsResponseBuilder::MakePlayerListBuilder( in TEST() local 62 ASSERT_TRUE(builder->AddMediaPlayer(player1)); in TEST() 63 ASSERT_FALSE(builder->AddMediaPlayer(player2)); in TEST() [all …]
|
D | register_notification_packet_test.cc | 55 auto builder = in TEST() local 57 ASSERT_EQ(builder->size(), register_volume_changed_notification.size()); in TEST() 60 builder->Serialize(test_packet); in TEST() 106 auto builder = RegisterNotificationResponseBuilder::MakePlaybackStatusBuilder( in TEST() local 108 ASSERT_EQ(builder->size(), interim_play_status_notification.size()); in TEST() 110 builder->Serialize(test_packet); in TEST() 115 auto builder = RegisterNotificationResponseBuilder::MakeTrackChangedBuilder( in TEST() local 117 ASSERT_EQ(builder->size(), interim_track_changed_notification.size()); in TEST() 119 builder->Serialize(test_packet); in TEST() 124 auto builder = in TEST() local [all …]
|
D | get_item_attributes_packet_test.cc | 29 auto builder = in TEST() local 31 ASSERT_EQ(builder->size(), 5u); in TEST() 33 builder->AddAttributeEntry(Attribute::TITLE, "Test Song"); in TEST() 34 ASSERT_EQ(builder->size(), 22u); in TEST() 36 builder->AddAttributeEntry(Attribute::ARTIST_NAME, "Test Artist"); in TEST() 37 ASSERT_EQ(builder->size(), 41u); in TEST() 39 builder->AddAttributeEntry(Attribute::ALBUM_NAME, "Test Album"); in TEST() 40 ASSERT_EQ(builder->size(), get_item_attributes_song_response.size()); in TEST() 44 auto builder = in TEST() local 46 builder->AddAttributeEntry(Attribute::TITLE, "Test Song"); in TEST() [all …]
|
D | get_element_attributes_packet_test.cc | 81 auto builder = GetElementAttributesResponseBuilder::MakeBuilder(0xFFFF); in TEST() local 82 ASSERT_EQ(builder->size(), 11u); in TEST() 83 builder->AddAttributeEntry(Attribute::TITLE, "test"); in TEST() 84 ASSERT_EQ(builder->size(), 23u); in TEST() 85 builder->AddAttributeEntry(Attribute::ARTIST_NAME, "test"); in TEST() 86 ASSERT_EQ(builder->size(), 35u); in TEST() 90 auto builder = GetElementAttributesResponseBuilder::MakeBuilder(0xFFFF); in TEST() local 91 builder->AddAttributeEntry(Attribute::TITLE, "Test Song"); in TEST() 92 builder->AddAttributeEntry(Attribute::ARTIST_NAME, "Test Artist"); in TEST() 93 builder->AddAttributeEntry(Attribute::ALBUM_NAME, "Test Album"); in TEST() [all …]
|
D | change_path_packet_test.cc | 31 auto builder = ChangePathResponseBuilder::MakeBuilder(Status::NO_ERROR, 2); in TEST() local 32 ASSERT_EQ(builder->size(), change_path_response.size()); in TEST() 35 builder->Serialize(test_packet); in TEST() 42 auto builder = in TEST() local 44 ASSERT_EQ(builder->size(), change_path_error_response.size()); in TEST() 47 builder->Serialize(test_packet); in TEST() 76 auto builder = ChangePathRequestBuilder::MakeBuilder(0, Direction::DOWN, 2); in TEST() local 77 ASSERT_EQ(builder->size(), change_path_request.size()); in TEST() 80 builder->Serialize(test_packet); in TEST()
|
/system/core/fs_mgr/liblp/ |
D | builder_test.cpp | 48 unique_ptr<MetadataBuilder> builder = MetadataBuilder::New(1024 * 1024, 1024, 2); in TEST_F() local 49 ASSERT_NE(builder, nullptr); in TEST_F() 51 Partition* partition = builder->AddPartition("system", LP_PARTITION_ATTR_READONLY); in TEST_F() 56 EXPECT_EQ(builder->FindPartition("system"), partition); in TEST_F() 58 builder->RemovePartition("system"); in TEST_F() 59 EXPECT_EQ(builder->FindPartition("system"), nullptr); in TEST_F() 63 unique_ptr<MetadataBuilder> builder = MetadataBuilder::New(1024 * 1024, 1024, 2); in TEST_F() local 64 ASSERT_NE(builder, nullptr); in TEST_F() 66 Partition* system = builder->AddPartition("system", LP_PARTITION_ATTR_READONLY); in TEST_F() 68 EXPECT_EQ(builder->ResizePartition(system, 65536), true); in TEST_F() [all …]
|
/system/bt/bta/test/gatt/ |
D | database_builder_sample_device_test.cc | 120 DatabaseBuilder builder; in TEST() local 122 EXPECT_FALSE(builder.InProgress()); in TEST() 126 builder.AddService(0x0001, 0x0007, SERVICE_1_UUID, true); in TEST() 131 EXPECT_TRUE(builder.InProgress()); in TEST() 133 builder.AddService(0x0008, 0x0008, SERVICE_2_UUID, true); in TEST() 134 builder.AddService(0x0009, 0x000c, SERVICE_3_UUID, true); in TEST() 135 builder.AddService(0x000d, 0x001a, SERVICE_4_UUID, true); in TEST() 136 builder.AddService(0x001b, 0x0029, SERVICE_5_UUID, true); in TEST() 137 builder.AddService(0x002a, 0x0031, SERVICE_6_UUID, true); in TEST() 141 EXPECT_TRUE(builder.StartNextServiceExploration()); in TEST() [all …]
|
D | database_builder_test.cc | 52 DatabaseBuilder builder; in TEST() local 54 EXPECT_FALSE(builder.InProgress()); in TEST() 57 builder.AddService(0x0001, 0x0001, SERVICE_1_UUID, true); in TEST() 58 EXPECT_FALSE(builder.StartNextServiceExploration()); in TEST() 60 Database result = builder.Build(); in TEST() 72 DatabaseBuilder builder; in TEST() local 74 EXPECT_FALSE(builder.InProgress()); in TEST() 77 builder.AddService(0x0001, 0x000f, SERVICE_1_UUID, true); in TEST() 78 builder.AddCharacteristic(0x0002, 0x0003, SERVICE_1_CHAR_1_UUID, 0x02); in TEST() 79 builder.AddDescriptor(0x0004, SERVICE_1_CHAR_1_DESC_1_UUID); in TEST() [all …]
|
/system/bt/gd/dumpsys/test_data/ |
D | foo.h | 14 FooTestSchemaBuilder builder(fb_builder); in GetTable() 15 builder.add_foo_int_private(123); in GetTable() 16 builder.add_foo_int_opaque(123); in GetTable() 17 builder.add_foo_int_anonymized(123); in GetTable() 18 builder.add_foo_int_any(123); in GetTable() 19 builder.add_foo_int_string(int_string); in GetTable() 21 builder.add_foo_float_private(123.456); in GetTable() 22 builder.add_foo_float_opaque(123.456); in GetTable() 23 builder.add_foo_float_anonymized(123.456); in GetTable() 24 builder.add_foo_float_any(123.456); in GetTable() [all …]
|
D | qux.h | 13 QuxTestSchemaBuilder builder(fb_builder); in GetTable() 14 builder.add_qux_int_private(123); in GetTable() 15 builder.add_qux_int_opaque(456); in GetTable() 16 builder.add_qux_int_anonymized(789); in GetTable() 17 builder.add_qux_int_any(0xabc); in GetTable() 18 builder.add_qux_string_name(name); in GetTable() 20 auto qux_table = builder.Finish(); in GetTable() 22 …return [qux_table](DumpsysTestDataRootBuilder* builder) { builder->add_qux_module_data(qux_table);… in GetTable()
|
D | baz.h | 21 BazTestSchemaBuilder builder(fb_builder); in GetTable() 22 builder.add_sub_table_private(private_subtable); in GetTable() 23 builder.add_sub_table_opaque(opaque_subtable); in GetTable() 24 builder.add_sub_table_anonymized(anonymized_subtable); in GetTable() 25 builder.add_sub_table_any(any_subtable); in GetTable() 26 auto baz_table = builder.Finish(); in GetTable() 28 …return [baz_table](DumpsysTestDataRootBuilder* builder) { builder->add_baz_module_data(baz_table);… in GetTable()
|
/system/chre/platform/shared/ |
D | host_protocol_chre.cc | 121 FlatBufferBuilder& builder, const char *name, const char *vendor, in encodeHubInfoResponse() argument 126 auto nameOffset = addStringAsByteVector(builder, name); in encodeHubInfoResponse() 127 auto vendorOffset = addStringAsByteVector(builder, vendor); in encodeHubInfoResponse() 128 auto toolchainOffset = addStringAsByteVector(builder, toolchain); in encodeHubInfoResponse() 131 builder, nameOffset, vendorOffset, toolchainOffset, legacyPlatformVersion, in encodeHubInfoResponse() 134 finalize(builder, fbs::ChreMessage::HubInfoResponse, response.Union(), in encodeHubInfoResponse() 139 FlatBufferBuilder& builder, in addNanoappListEntry() argument 143 builder, appId, appVersion, enabled, isSystemNanoapp); in addNanoappListEntry() 150 FlatBufferBuilder& builder, in finishNanoappListResponse() argument 153 auto vectorOffset = builder.CreateVector<Offset<fbs::NanoappListEntry>>( in finishNanoappListResponse() [all …]
|
D | host_protocol_common.cc | 30 FlatBufferBuilder& builder, uint64_t appId, uint32_t messageType, in encodeNanoappMessage() argument 32 auto messageDataOffset = builder.CreateVector( in encodeNanoappMessage() 36 builder, appId, messageType, hostEndpoint, messageDataOffset); in encodeNanoappMessage() 37 finalize(builder, fbs::ChreMessage::NanoappMessage, nanoappMessage.Union()); in encodeNanoappMessage() 41 FlatBufferBuilder& builder, const char *str) { in addStringAsByteVector() argument 42 return builder.CreateVector(reinterpret_cast<const int8_t *>(str), in addStringAsByteVector() 47 FlatBufferBuilder& builder, fbs::ChreMessage messageType, in finalize() argument 51 builder, messageType, message, &hostAddr); in finalize() 52 builder.Finish(container); in finalize()
|
/system/extras/verity/ |
D | build_verity_tree_test.cpp | 42 builder.reset(new HashTreeBuilder(4096, EVP_sha256())); in SetUp() 46 return builder->zero_block_hash_; in zero_block_hash() 49 return builder->verity_tree_; in verity_tree() 54 ASSERT_TRUE(builder->Initialize(data.size(), salt)); in GenerateHashTree() 55 ASSERT_TRUE(builder->Update(data.data(), data.size())); in GenerateHashTree() 56 ASSERT_TRUE(builder->BuildHashTree()); in GenerateHashTree() 60 std::unique_ptr<HashTreeBuilder> builder; member in BuildVerityTreeTest 65 ASSERT_EQ(4096u, builder->CalculateSize(1)); in TEST_F() 67 ASSERT_EQ(4096u, builder->CalculateSize(128 * 4096)); in TEST_F() 69 ASSERT_EQ(12288u, builder->CalculateSize(128 * 4096 + 1)); in TEST_F() [all …]
|
/system/bt/packet/tests/base/ |
D | packet_builder_test.cc | 29 auto builder = TestPacketBuilder::MakeBuilder(test_l2cap_data); in TEST() local 32 builder->Serialize(packet); in TEST() 40 auto builder = TestPacketBuilder::MakeBuilder(test_l2cap_data); in TEST() local 42 ASSERT_EQ(builder->size(), test_l2cap_data.size()); in TEST() 49 auto builder = TestPacketBuilder::MakeBuilder(test_l2cap_data); in TEST() local 50 builder->ReserveSpace(packet, test_l2cap_data.size()); in TEST() 56 auto builder = TestPacketBuilder::MakeBuilder(test_l2cap_data); in TEST() local 59 builder->AddPayloadOctets1(packet, 0x01u); in TEST() 60 builder->AddPayloadOctets2(packet, 0x0302u); in TEST() 61 builder->AddPayloadOctets3(packet, 0x060504u); in TEST() [all …]
|
/system/chre/host/common/ |
D | host_protocol_host.cc | 95 void HostProtocolHost::encodeHubInfoRequest(FlatBufferBuilder& builder) { in encodeHubInfoRequest() argument 96 auto request = fbs::CreateHubInfoRequest(builder); in encodeHubInfoRequest() 97 finalize(builder, fbs::ChreMessage::HubInfoRequest, request.Union()); in encodeHubInfoRequest() 101 flatbuffers::FlatBufferBuilder& builder, in encodeFragmentedLoadNanoappRequest() argument 104 builder, request.transactionId, request.appId, request.appVersion, in encodeFragmentedLoadNanoappRequest() 109 void HostProtocolHost::encodeNanoappListRequest(FlatBufferBuilder& builder) { in encodeNanoappListRequest() argument 110 auto request = fbs::CreateNanoappListRequest(builder); in encodeNanoappListRequest() 111 finalize(builder, fbs::ChreMessage::NanoappListRequest, request.Union()); in encodeNanoappListRequest() 115 FlatBufferBuilder& builder, uint32_t transactionId, uint64_t appId, in encodeUnloadNanoappRequest() argument 118 builder, transactionId, appId, allowSystemNanoappUnload); in encodeUnloadNanoappRequest() [all …]
|
/system/core/fs_mgr/libfiemap/ |
D | metadata.cpp | 67 std::unique_ptr<MetadataBuilder> builder; in OpenOrCreateMetadata() local 84 builder = MetadataBuilder::New(block_devices, super_name, kMaxMetadataSize, 1); in OpenOrCreateMetadata() 90 builder = MetadataBuilder::New(*metadata.get(), &opener); in OpenOrCreateMetadata() 93 if (!builder) { in OpenOrCreateMetadata() 97 return builder; in OpenOrCreateMetadata() 100 bool SaveMetadata(MetadataBuilder* builder, const std::string& metadata_dir) { in SaveMetadata() argument 101 auto exported = builder->Export(); in SaveMetadata() 129 bool FillPartitionExtents(MetadataBuilder* builder, Partition* partition, SplitFiemap* file, in FillPartitionExtents() argument 154 if (!builder->AddLinearExtent(partition, block_device, num_sectors, physical_sector)) { in FillPartitionExtents() 174 auto builder = MetadataBuilder::New(*metadata.get(), &opener); in RemoveImageMetadata() local [all …]
|
/system/bt/packet/tests/fuzzers/ |
D | get_element_attributes_res_packet_fuzzer.cc | 30 auto builder = GetElementAttributesResponseBuilder::MakeBuilder(0xFFFF); in LLVMFuzzerTestOneInput() local 33 builder->AddAttributeEntry(Attribute::TITLE, s); in LLVMFuzzerTestOneInput() 34 builder->AddAttributeEntry(Attribute::ARTIST_NAME, s); in LLVMFuzzerTestOneInput() 35 builder->AddAttributeEntry(Attribute::ALBUM_NAME, s); in LLVMFuzzerTestOneInput() 36 builder->AddAttributeEntry(Attribute::TRACK_NUMBER, s); in LLVMFuzzerTestOneInput() 37 builder->AddAttributeEntry(Attribute::TOTAL_NUMBER_OF_TRACKS, s); in LLVMFuzzerTestOneInput() 38 builder->AddAttributeEntry(Attribute::GENRE, s); in LLVMFuzzerTestOneInput() 39 builder->AddAttributeEntry(Attribute::PLAYING_TIME, s); in LLVMFuzzerTestOneInput() 42 builder->Serialize(test_packet); in LLVMFuzzerTestOneInput()
|
D | get_capabilities_res_fuzzer.cc | 32 auto builder = GetCapabilitiesResponseBuilder::MakeCompanyIdBuilder( in LLVMFuzzerTestOneInput() local 34 builder->AddCompanyId(data_provider.ConsumeIntegral<uint32_t>()); in LLVMFuzzerTestOneInput() 35 builder->AddCompanyId(data_provider.ConsumeIntegral<uint32_t>()); in LLVMFuzzerTestOneInput() 37 builder = GetCapabilitiesResponseBuilder::MakeEventsSupportedBuilder( in LLVMFuzzerTestOneInput() 39 builder->AddEvent(Event::TRACK_CHANGED); in LLVMFuzzerTestOneInput() 40 builder->AddEvent(Event::PLAYBACK_POS_CHANGED); in LLVMFuzzerTestOneInput()
|
/system/chre/host/common/test/ |
D | chre_test_client.cc | 135 FlatBufferBuilder builder(64); in requestHubInfo() local 136 HostProtocolHost::encodeHubInfoRequest(builder); in requestHubInfo() 138 LOGI("Sending hub info request (%" PRIu32 " bytes)", builder.GetSize()); in requestHubInfo() 139 if (!client.sendMessage(builder.GetBufferPointer(), builder.GetSize())) { in requestHubInfo() 145 FlatBufferBuilder builder(64); in requestNanoappList() local 146 HostProtocolHost::encodeNanoappListRequest(builder); in requestNanoappList() 148 LOGI("Sending app list request (%" PRIu32 " bytes)", builder.GetSize()); in requestNanoappList() 149 if (!client.sendMessage(builder.GetBufferPointer(), builder.GetSize())) { in requestNanoappList() 155 FlatBufferBuilder builder(64); in sendMessageToNanoapp() local 158 builder, chre::kMessageWorldAppId, 1234 /* messageType */, in sendMessageToNanoapp() [all …]
|
/system/bt/gd/dumpsys/ |
D | bluetooth_flatbuffer_test.cc | 38 flatbuffers::FlatBufferBuilder builder(1024); in TEST_F() local 39 auto string_private = builder.CreateString("String private"); in TEST_F() 40 auto string_opaque = builder.CreateString("String opaque"); in TEST_F() 41 auto string_anonymized = builder.CreateString("String anonymized"); in TEST_F() 42 auto string_any = builder.CreateString("String any"); in TEST_F() 44 TestTableBuilder table_builder(builder); in TEST_F() 55 builder.Finish(table_builder.Finish()); in TEST_F() 57 const TestTable* test_table = GetTestTable(builder.GetBufferPointer()); in TEST_F()
|
/system/chre/platform/shared/include/chre/platform/shared/ |
D | host_protocol_chre.h | 97 flatbuffers::FlatBufferBuilder& builder, const char *name, 122 flatbuffers::FlatBufferBuilder& builder, 137 flatbuffers::FlatBufferBuilder& builder, 146 flatbuffers::FlatBufferBuilder& builder, uint16_t hostClientId, 154 flatbuffers::FlatBufferBuilder& builder, uint16_t hostClientId, 161 flatbuffers::FlatBufferBuilder& builder, const char *logBuffer, 171 flatbuffers::FlatBufferBuilder& builder, uint16_t hostClientId, 178 flatbuffers::FlatBufferBuilder& builder, uint16_t hostClientId, 184 static void encodeTimeSyncRequest(flatbuffers::FlatBufferBuilder& builder); 191 flatbuffers::FlatBufferBuilder& builder); [all …]
|
/system/bt/packet/avrcp/ |
D | register_notification_packet.cc | 76 std::unique_ptr<RegisterNotificationResponseBuilder> builder( in MakePlaybackStatusBuilder() local 80 builder->data_ = play_status; in MakePlaybackStatusBuilder() 81 return builder; in MakePlaybackStatusBuilder() 87 std::unique_ptr<RegisterNotificationResponseBuilder> builder( in MakeTrackChangedBuilder() local 90 builder->data_ = track_uid; in MakeTrackChangedBuilder() 91 return builder; in MakeTrackChangedBuilder() 97 std::unique_ptr<RegisterNotificationResponseBuilder> builder( in MakePlaybackPositionBuilder() local 101 builder->data_ = playback_pos; in MakePlaybackPositionBuilder() 102 return builder; in MakePlaybackPositionBuilder() 107 std::unique_ptr<RegisterNotificationResponseBuilder> builder( in MakeNowPlayingBuilder() local [all …]
|
/system/chre/platform/slpi/ |
D | host_link.cc | 74 FlatBufferBuilder *builder; member 105 PendingMessage(PendingMessageType msgType, FlatBufferBuilder *builder) { in PendingMessage() 107 data.builder = builder; in PendingMessage() 114 FlatBufferBuilder *builder; member 134 typedef void (MessageBuilderFunction)(FlatBufferBuilder& builder, void *cookie); 139 int copyToHostBuffer(const FlatBufferBuilder& builder, unsigned char *buffer, in copyToHostBuffer() argument 141 uint8_t *data = builder.GetBufferPointer(); in copyToHostBuffer() 142 size_t size = builder.GetSize(); in copyToHostBuffer() 199 auto builder = MakeUnique<FlatBufferBuilder>(initialBufferSize); in buildAndEnqueueMessage() local 200 if (builder.isNull()) { in buildAndEnqueueMessage() [all …]
|