/system/tools/aidl/ |
D | aidl_to_java.cpp | 340 c.writer << c.parcel << ".writeBoolean(" << c.var << ");\n"; in WriteToParcelFor() 342 c.writer << c.parcel << ".writeInt(((" << c.var << ")?(1):(0)));\n"; in WriteToParcelFor() 347 c.writer << c.parcel << ".writeBooleanArray(" << c.var << ");\n"; in WriteToParcelFor() 351 c.writer << c.parcel << ".writeByte(" << c.var << ");\n"; in WriteToParcelFor() 355 c.writer << c.parcel << ".writeByteArray(" << c.var << ");\n"; in WriteToParcelFor() 359 c.writer << c.parcel << ".writeInt(((int)" << c.var << "));\n"; in WriteToParcelFor() 363 c.writer << c.parcel << ".writeCharArray(" << c.var << ");\n"; in WriteToParcelFor() 367 c.writer << c.parcel << ".writeInt(" << c.var << ");\n"; in WriteToParcelFor() 371 c.writer << c.parcel << ".writeIntArray(" << c.var << ");\n"; in WriteToParcelFor() 375 c.writer << c.parcel << ".writeLong(" << c.var << ");\n"; in WriteToParcelFor() [all …]
|
D | code_writer_unittest.cpp | 32 CodeWriter& writer = *ptr; in TEST() local 33 writer << "Write this"; in TEST() 34 writer.Close(); in TEST() 41 CodeWriter& writer = *ptr; in TEST() local 42 writer << "Write this " << "and that"; in TEST() 43 writer.Close(); in TEST() 53 CodeWriter& writer = *ptr; in TEST() local 54 writer << "가"; in TEST() 55 writer.Close(); in TEST()
|
/system/libziparchive/ |
D | zip_writer_test.cc | 49 ZipWriter writer(file_); in TEST_F() local 53 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F() 54 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F() 55 ASSERT_EQ(0, writer.Finish()); in TEST_F() 74 ZipWriter writer(file_); in TEST_F() local 78 ASSERT_EQ(0, writer.StartEntry("file.txt", ZipWriter::kCompress)); in TEST_F() 79 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F() 80 ASSERT_EQ(0, writer.Finish()); in TEST_F() 98 ZipWriter writer(file_); in TEST_F() local 102 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F() [all …]
|
D | libziparchive_writer_fuzzer.cpp | 19 ZipWriter writer(fp.get()); in LLVMFuzzerTestOneInput() local 25 if (writer.StartEntry(path, path.size()) == 0) { in LLVMFuzzerTestOneInput() 33 writer.WriteBytes(next_buf.data(), next_buf.size()); in LLVMFuzzerTestOneInput() 35 writer.FinishEntry(); in LLVMFuzzerTestOneInput() 38 writer.Finish(); in LLVMFuzzerTestOneInput()
|
/system/tools/sysprop/tests/ |
D | CodeWriterUnitTest.cpp | 39 CodeWriter writer(kIndent); in TEST() local 40 writer.Write("test1\ntest2\n"); in TEST() 41 writer.Indent(); in TEST() 42 writer.Write("test3\ntest4\n"); in TEST() 43 writer.Indent(); in TEST() 44 writer.Write("test5\ntest6\n"); in TEST() 45 writer.Dedent(); in TEST() 46 writer.Dedent(); in TEST() 47 writer.Write("test7\ntest8\n"); in TEST() 49 ASSERT_EQ(writer.Code(), in TEST() [all …]
|
/system/tools/sysprop/ |
D | JavaGen.cpp | 360 CodeWriter writer(kIndent); in GenerateJavaClass() local 361 writer.Write("%s", kGeneratedFileFooterComments); in GenerateJavaClass() 362 writer.Write("package %s;\n\n", package_name.c_str()); in GenerateJavaClass() 363 writer.Write("%s", kJavaFileImports); in GenerateJavaClass() 364 writer.Write("public final class %s {\n", class_name.c_str()); in GenerateJavaClass() 365 writer.Indent(); in GenerateJavaClass() 366 writer.Write("private %s () {}\n\n", class_name.c_str()); in GenerateJavaClass() 367 writer.Write("%s", kJavaParsersAndFormatters); in GenerateJavaClass() 375 writer.Write("\n"); in GenerateJavaClass() 381 writer.Write("public static enum %s {\n", in GenerateJavaClass() [all …]
|
/system/core/fs_mgr/libsnapshot/libsnapshot_cow/ |
D | cow_api_test.cpp | 68 CowWriter writer(options); in TEST_F() local 70 ASSERT_TRUE(writer.Initialize(cow_->fd)); in TEST_F() 72 ASSERT_TRUE(writer.AddCopy(10, 1000, 100)); in TEST_F() 73 ASSERT_TRUE(writer.Finalize()); in TEST_F() 110 CowWriter writer(options); in TEST_F() local 112 ASSERT_TRUE(writer.Initialize(cow_->fd)); in TEST_F() 117 ASSERT_TRUE(writer.AddCopy(10, 20)); in TEST_F() 118 ASSERT_TRUE(writer.AddRawBlocks(50, data.data(), data.size())); in TEST_F() 119 ASSERT_TRUE(writer.AddZeroBlocks(51, 2)); in TEST_F() 120 ASSERT_TRUE(writer.Finalize()); in TEST_F() [all …]
|
/system/libufdt/utils/src/ |
D | mkdtimg_core.c | 243 struct dt_image_writer *writer = NULL; in dt_image_writer_start() local 246 writer = malloc(sizeof(struct dt_image_writer)); in dt_image_writer_start() 247 if (!writer) goto error; in dt_image_writer_start() 252 writer->img_fp = img_fp; in dt_image_writer_start() 253 init_dt_global_options(&writer->global_options); in dt_image_writer_start() 254 init_dt_options(&writer->entry_options); in dt_image_writer_start() 255 writer->entry_filename[0] = '\0'; in dt_image_writer_start() 256 writer->entry_count = entry_count; in dt_image_writer_start() 257 writer->entry_offset = sizeof(struct dt_table_header); in dt_image_writer_start() 258 writer->dt_offset = in dt_image_writer_start() [all …]
|
/system/linkerconfig/modules/tests/ |
D | namespace_test.cc | 105 ConfigWriter writer; in TEST() local 107 ns.WriteConfig(writer); in TEST() 108 auto config = writer.ToString(); in TEST() 114 ConfigWriter writer; in TEST() local 118 ns.WriteConfig(writer); in TEST() 119 auto config = writer.ToString(); in TEST() 125 ConfigWriter writer; in TEST() local 129 ns.WriteConfig(writer); in TEST() 131 auto config = writer.ToString(); in TEST() 144 ConfigWriter writer; in TEST() local [all …]
|
D | configwriter_test.cc | 25 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 27 writer.WriteLine(kSampleContent); in TEST() 29 ASSERT_EQ(writer.ToString(), "Lorem ipsum dolor sit amet\n"); in TEST() 33 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 35 writer.WriteVars("var1", {"value1", "value2"}); in TEST() 36 writer.WriteVars("var2", {"value1"}); in TEST() 37 writer.WriteVars("var3", {}); in TEST() 43 writer.ToString()); in TEST()
|
D | link_test.cc | 27 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 33 link->WriteConfig(writer); in TEST() 34 auto config_text = writer.ToString(); in TEST() 42 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 47 link->WriteConfig(writer); in TEST() 48 auto config_text = writer.ToString(); in TEST()
|
D | section_test.cc | 123 ConfigWriter writer; in TEST() local 135 section.WriteConfig(writer); in TEST() 136 auto config = writer.ToString(); in TEST() 141 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 147 section.WriteConfig(writer); in TEST() 148 auto config = writer.ToString(); in TEST() 166 ConfigWriter writer; in TEST() local 167 section.WriteConfig(writer); in TEST() 179 writer.ToString()); in TEST() 233 ConfigWriter writer; in TEST() local [all …]
|
/system/extras/simpleperf/ |
D | record_file_test.cpp | 59 std::unique_ptr<RecordFileWriter> writer = RecordFileWriter::CreateInstance(tmpfile_.path); in TEST_F() local 60 ASSERT_TRUE(writer != nullptr); in TEST_F() 64 ASSERT_TRUE(writer->WriteAttrSection(attr_ids_)); in TEST_F() 69 ASSERT_TRUE(writer->WriteRecord(mmap_record)); in TEST_F() 72 ASSERT_TRUE(writer->BeginWriteFeatures(1)); in TEST_F() 80 ASSERT_TRUE(writer->WriteBuildIdFeature(build_id_records)); in TEST_F() 81 ASSERT_TRUE(writer->EndWriteFeatures()); in TEST_F() 82 ASSERT_TRUE(writer->Close()); in TEST_F() 107 std::unique_ptr<RecordFileWriter> writer = RecordFileWriter::CreateInstance(tmpfile_.path); in TEST_F() local 108 ASSERT_TRUE(writer != nullptr); in TEST_F() [all …]
|
/system/media/tests/ |
D | EffectParamWrapper_tests.cpp | 181 auto writer = EffectParamWriter(*param); in TEST() local 185 EXPECT_EQ(OK, writer.writeToParameter(&data[0])); in TEST() 186 EXPECT_EQ(OK, writer.writeToParameter(&data[1])); in TEST() 187 EXPECT_EQ(OK, writer.writeToParameter(&data[2])); in TEST() 188 EXPECT_EQ(OK, writer.writeToParameter(&data[3])); in TEST() 189 EXPECT_EQ(OK, writer.writeToParameter(&data[4])); in TEST() 190 EXPECT_NE(OK, writer.writeToParameter(&data[5])); // expect write error in TEST() 191 EXPECT_EQ(OK, writer.writeToValue(&data[6])); in TEST() 192 EXPECT_EQ(OK, writer.writeToValue(&data[7])); in TEST() 193 EXPECT_EQ(OK, writer.writeToValue(&data[8])); in TEST() [all …]
|
/system/update_engine/payload_consumer/ |
D | install_operation_executor.cc | 53 BsdiffExtentFile(std::unique_ptr<ExtentWriter> writer, size_t size) in BsdiffExtentFile() argument 54 : BsdiffExtentFile(nullptr, std::move(writer), size) {} in BsdiffExtentFile() 93 std::unique_ptr<ExtentWriter> writer, in BsdiffExtentFile() argument 96 writer_(std::move(writer)), in BsdiffExtentFile() 116 PuffinExtentStream(std::unique_ptr<ExtentWriter> writer, uint64_t size) in PuffinExtentStream() argument 117 : PuffinExtentStream(nullptr, std::move(writer), size) {} in PuffinExtentStream() 161 std::unique_ptr<ExtentWriter> writer, in PuffinExtentStream() argument 164 writer_(std::move(writer)), in PuffinExtentStream() 180 std::unique_ptr<ExtentWriter> writer, in ExecuteReplaceOperation() argument 188 writer.reset(new BzipExtentWriter(std::move(writer))); in ExecuteReplaceOperation() [all …]
|
D | install_operation_executor.h | 34 std::unique_ptr<ExtentWriter> writer, 38 std::unique_ptr<ExtentWriter> writer); 40 std::unique_ptr<ExtentWriter> writer, 44 std::unique_ptr<ExtentWriter> writer, 51 std::unique_ptr<ExtentWriter> writer, 56 std::unique_ptr<ExtentWriter> writer, 61 std::unique_ptr<ExtentWriter> writer, 66 std::unique_ptr<ExtentWriter> writer,
|
D | file_descriptor_utils.cc | 43 ExtentWriter* writer, in CommonHashExtents() argument 64 if (writer) { in CommonHashExtents() 66 writer->Write(buf.data(), read_blocks * block_size)); in CommonHashExtents() 84 DirectExtentWriter writer{target}; in CopyAndHashExtents() local 85 TEST_AND_RETURN_FALSE(writer.Init(tgt_extents, block_size)); in CopyAndHashExtents() 89 CommonHashExtents(source, src_extents, &writer, block_size, hash_out)); in CopyAndHashExtents()
|
/system/timezone/input_tools/android/tzlookup_generator/src/main/java/com/android/libcore/timezone/tzlookup/ |
D | TzLookupFile.java | 97 StringWriter writer = new StringWriter(); in write() local 98 writeRaw(timeZones, writer); in write() 99 String rawXml = writer.getBuffer().toString(); in write() 140 static void writeXml(TimeZones timeZones, XMLStreamWriter writer) in writeXml() argument 142 writer.writeStartElement(TIMEZONES_ELEMENT); in writeXml() 143 writer.writeAttribute(IANA_VERSION_ATTRIBUTE, timeZones.ianaVersion); in writeXml() 144 CountryZones.writeXml(timeZones.countryZones, writer); in writeXml() 145 writer.writeEndElement(); in writeXml() 156 static void writeXml(CountryZones countryZones, XMLStreamWriter writer) in writeXml() argument 158 writer.writeStartElement(COUNTRY_ZONES_ELEMENT); in writeXml() [all …]
|
/system/timezone/input_tools/android/telephonylookup_generator/src/main/java/com/android/libcore/timezone/telephonylookup/ |
D | TelephonyLookupXmlFile.java | 68 StringWriter writer = new StringWriter(); in write() local 69 writeRaw(telephonyLookup, writer); in write() 70 String rawXml = writer.getBuffer().toString(); in write() 105 static void writeXml(TelephonyLookup telephonyLookup, XMLStreamWriter writer) in writeXml() argument 107 writer.writeStartElement(TELEPHONY_LOOKUP_ELEMENT); in writeXml() 108 writer.writeStartElement(NETWORKS_ELEMENT); in writeXml() 110 network.writeXml(network, writer); in writeXml() 112 writer.writeEndElement(); // NETWORKS_ELEMENT in writeXml() 113 writer.writeEndElement(); // TELEPHONY_LOOKUP_ELEMENT in writeXml() 129 static void writeXml(Network network, XMLStreamWriter writer) in writeXml() argument [all …]
|
/system/nvram/messages/ |
D | message_codec.cpp | 30 ProtoWriter* writer, in Encode() argument 34 return encoder.Encode(writer); in Encode() 39 ProtoWriter writer(&counting_stream); in GetSize() local 40 return EncodeData(&writer) ? counting_stream.bytes_written() : 0; in GetSize() 43 bool MessageEncoderBase::Encode(ProtoWriter* writer) { in Encode() argument 67 return writer->WriteLengthHeader(GetSize()) && EncodeData(writer); in Encode() 70 bool MessageEncoderBase::EncodeData(ProtoWriter* writer) { in EncodeData() argument 73 writer->set_field_number(desc.field_number); in EncodeData() 74 if (!desc.encode_function(object_, writer)) { in EncodeData()
|
/system/core/fs_mgr/libsnapshot/ |
D | snapshot_reader_test.cpp | 64 void WriteCow(ISnapshotWriter* writer) { in WriteCow() argument 68 ASSERT_TRUE(writer->AddXorBlocks(1, xor_block.data(), xor_block.size(), 0, kBlockSize / 2)); in WriteCow() 69 ASSERT_TRUE(writer->AddCopy(3, 0)); in WriteCow() 70 ASSERT_TRUE(writer->AddRawBlocks(5, new_block.data(), new_block.size())); in WriteCow() 71 ASSERT_TRUE(writer->AddZeroBlocks(7, 2)); in WriteCow() 72 ASSERT_TRUE(writer->Finalize()); in WriteCow() 75 void TestBlockReads(ISnapshotWriter* writer) { in TestBlockReads() argument 76 auto reader = writer->OpenReader(); in TestBlockReads() 120 void TestByteReads(ISnapshotWriter* writer) { in TestByteReads() argument 121 auto reader = writer->OpenReader(); in TestByteReads() [all …]
|
/system/linkerconfig/modules/ |
D | namespace.cc | 84 void Namespace::WriteConfig(ConfigWriter& writer) { in WriteConfig() argument 94 writer.WriteLine(prefix + "isolated = " + (is_isolated_ ? "true" : "false")); in WriteConfig() 97 writer.WriteLine(prefix + "visible = true"); in WriteConfig() 100 writer.WriteVars(prefix + "search.paths", search_paths_); in WriteConfig() 101 writer.WriteVars(prefix + "permitted.paths", permitted_paths_); in WriteConfig() 102 writer.WriteVars(prefix + "asan.search.paths", asan_search_paths_); in WriteConfig() 103 writer.WriteVars(prefix + "asan.permitted.paths", asan_permitted_paths_); in WriteConfig() 104 writer.WriteVars(prefix + "hwasan.search.paths", hwasan_search_paths_); in WriteConfig() 105 writer.WriteVars(prefix + "hwasan.permitted.paths", hwasan_permitted_paths_); in WriteConfig() 106 writer.WriteVars(prefix + "allowed_libs", allowed_libs_); in WriteConfig() [all …]
|
/system/nvram/messages/include/nvram/messages/ |
D | proto.hpp | 134 NVRAM_NOINLINE bool EncodeField(const Type& value, ProtoWriter* writer) { in EncodeField() argument 135 return Codec::Encode(value, writer); in EncodeField() 153 static bool Encode(const Blob& blob, ProtoWriter* writer) { in Encode() 154 return writer->WriteLengthDelimited(blob.data(), blob.size()); in Encode() 189 static bool Encode(const Type& value, ProtoWriter* writer) { in Encode() 190 return writer->WriteVarint(static_cast<uint64_t>(value)); in Encode() 209 static bool Encode(const Vector<ElementType>& vector, ProtoWriter* writer) { in Encode() 211 if (!EncodeField<ElementCodec>(elem, writer)) { in Encode() 230 static bool Encode(const Optional<ValueType>& value, ProtoWriter* writer) { in Encode() 231 return !value.valid() || EncodeField<ValueCodec>(value.value(), writer); in Encode() [all …]
|
/system/core/fs_mgr/libsnapshot/snapuserd/dm-snapshot-merge/ |
D | cow_snapuserd_test.cpp | 299 CowWriter writer(options); in ReadLastBlock() local 301 ASSERT_TRUE(writer.Initialize(cow_system_->fd)); in ReadLastBlock() 303 ASSERT_TRUE(writer.AddRawBlocks(0, random_buffer_1_.get(), BLOCK_SZ)); in ReadLastBlock() 304 ASSERT_TRUE(writer.AddRawBlocks(1, (char*)random_buffer_1_.get() + BLOCK_SZ, BLOCK_SZ)); in ReadLastBlock() 306 ASSERT_TRUE(writer.Finalize()); in ReadLastBlock() 389 CowWriter writer(options); in CreateCowDeviceWithCopyOverlap_2() local 391 ASSERT_TRUE(writer.Initialize(cow_system_->fd)); in CreateCowDeviceWithCopyOverlap_2() 399 ASSERT_TRUE(writer.AddCopy(blk_src_copy, blk_src_copy + 1)); in CreateCowDeviceWithCopyOverlap_2() 408 ASSERT_TRUE(writer.Finalize()); in CreateCowDeviceWithCopyOverlap_2() 441 CowWriter writer(options); in CreateCowDeviceWithCopyOverlap_1() local [all …]
|
/system/chre/apps/test/common/chre_api_test/src/ |
D | chre_api_test_manager.cc | 39 Optional<ChreApiTestService::ServerWriter<T>> &writer) { in finishAndCloseWriter() argument 40 CHRE_ASSERT(writer.has_value()); in finishAndCloseWriter() 44 writer->Finish(); in finishAndCloseWriter() 45 writer.reset(); in finishAndCloseWriter() 58 Optional<ChreApiTestService::ServerWriter<T>> &writer, const T &message) { in sendFinishAndCloseWriter() argument 59 CHRE_ASSERT(writer.has_value()); in sendFinishAndCloseWriter() 63 pw::Status status = writer->Write(message); in sendFinishAndCloseWriter() 65 finishAndCloseWriter(writer); in sendFinishAndCloseWriter() 77 Optional<ChreApiTestService::ServerWriter<T>> &writer) { in sendFailureAndFinishCloseWriter() argument 78 CHRE_ASSERT(writer.has_value()); in sendFailureAndFinishCloseWriter() [all …]
|