/system/core/demangle/ |
D | DemangleTest.cpp | 28 ASSERT_EQ("_Zpp4FUNKK", demangler.Parse("_Zpp4FUNKK")); in TEST() 29 ASSERT_EQ("_Zpp4FUNVV", demangler.Parse("_Zpp4FUNVV")); in TEST() 35 ASSERT_EQ("func()", demangler.Parse("_ZN4funcEv")); in TEST() 36 ASSERT_EQ("func(void&)", demangler.Parse("_ZN4funcERv")); in TEST() 37 ASSERT_EQ("func(void, void)", demangler.Parse("_ZN4funcEvv")); in TEST() 38 ASSERT_EQ("func(void*)", demangler.Parse("_ZN4funcEPv")); in TEST() 39 ASSERT_EQ("func(void const)", demangler.Parse("_ZN4funcEKv")); in TEST() 40 ASSERT_EQ("func(void volatile)", demangler.Parse("_ZN4funcEVv")); in TEST() 46 ASSERT_EQ("func(char)", demangler.Parse("_ZN4funcEc")); in TEST() 47 ASSERT_EQ("func(char*)", demangler.Parse("_ZN4funcEPc")); in TEST() [all …]
|
/system/core/libunwindstack/tests/ |
D | ArmExidxDecodeTest.cpp | 88 ASSERT_EQ("", GetFakeLogBuf()); in TEST_P() 90 ASSERT_EQ("4 unwind vsp = vsp + 4\n", GetFakeLogPrint()); in TEST_P() 92 ASSERT_EQ("", GetFakeLogPrint()); in TEST_P() 94 ASSERT_EQ(0x10004U, exidx_->cfa()); in TEST_P() 101 ASSERT_EQ("", GetFakeLogBuf()); in TEST_P() 103 ASSERT_EQ("4 unwind vsp = vsp + 8\n", GetFakeLogPrint()); in TEST_P() 105 ASSERT_EQ("", GetFakeLogPrint()); in TEST_P() 107 ASSERT_EQ(0x1000cU, exidx_->cfa()); in TEST_P() 114 ASSERT_EQ("", GetFakeLogBuf()); in TEST_P() 116 ASSERT_EQ("4 unwind vsp = vsp + 256\n", GetFakeLogPrint()); in TEST_P() [all …]
|
D | MapsTest.cpp | 36 ASSERT_EQ(5U, maps.Total()); in TEST() 38 ASSERT_EQ(PROT_NONE, it->flags); in TEST() 39 ASSERT_EQ(0x1000U, it->start); in TEST() 40 ASSERT_EQ(0x2000U, it->end); in TEST() 41 ASSERT_EQ(0U, it->offset); in TEST() 42 ASSERT_EQ("", it->name); in TEST() 44 ASSERT_EQ(PROT_READ, it->flags); in TEST() 45 ASSERT_EQ(0x2000U, it->start); in TEST() 46 ASSERT_EQ(0x3000U, it->end); in TEST() 47 ASSERT_EQ(0U, it->offset); in TEST() [all …]
|
D | DwarfCfaTest.cpp | 81 ASSERT_EQ(DWARF_ERROR_ILLEGAL_VALUE, this->cfa_->last_error()); in TYPED_TEST_P() 82 ASSERT_EQ(0x2001U, this->dmem_->cur_offset()); in TYPED_TEST_P() 84 ASSERT_EQ("", GetFakeLogPrint()); in TYPED_TEST_P() 85 ASSERT_EQ("", GetFakeLogBuf()); in TYPED_TEST_P() 94 ASSERT_EQ(0x2001U, this->dmem_->cur_offset()); in TYPED_TEST_P() 95 ASSERT_EQ(0U, loc_regs.size()); in TYPED_TEST_P() 97 ASSERT_EQ("", GetFakeLogPrint()); in TYPED_TEST_P() 98 ASSERT_EQ("", GetFakeLogBuf()); in TYPED_TEST_P() 107 ASSERT_EQ(0x2002U, this->dmem_->cur_offset()); in TYPED_TEST_P() 108 ASSERT_EQ(1U, loc_regs.size()); in TYPED_TEST_P() [all …]
|
D | DwarfOpTest.cpp | 56 ASSERT_EQ(DWARF_ERROR_MEMORY_INVALID, this->op_->last_error()); in TYPED_TEST_P() 62 ASSERT_EQ(DWARF_ERROR_NONE, this->op_->last_error()); in TYPED_TEST_P() 63 ASSERT_EQ(0x96U, this->op_->cur_op()); in TYPED_TEST_P() 64 ASSERT_EQ(1U, this->mem_->cur_offset()); in TYPED_TEST_P() 70 ASSERT_EQ(DWARF_ERROR_MEMORY_INVALID, this->op_->last_error()); in TYPED_TEST_P() 77 ASSERT_EQ(1U, this->mem_->cur_offset()); in TYPED_TEST_P() 78 ASSERT_EQ(1U, this->op_->StackSize()); in TYPED_TEST_P() 87 ASSERT_EQ(DWARF_ERROR_NONE, this->op_->last_error()); in TYPED_TEST_P() 89 ASSERT_EQ(8U, this->mem_->cur_offset()); in TYPED_TEST_P() 90 ASSERT_EQ(4U, this->op_->StackSize()); in TYPED_TEST_P() [all …]
|
D | ArmExidxExtractTest.cpp | 54 ASSERT_EQ(ARM_STATUS_INVALID_ALIGNMENT, exidx_->status()); in TEST_F() 62 ASSERT_EQ(ARM_STATUS_NO_UNWIND, exidx_->status()); in TEST_F() 70 ASSERT_EQ(3U, data_->size()); in TEST_F() 71 ASSERT_EQ(0xa8, data_->at(0)); in TEST_F() 72 ASSERT_EQ(0xb0, data_->at(1)); in TEST_F() 73 ASSERT_EQ(0xb0, data_->at(2)); in TEST_F() 80 ASSERT_EQ(4U, data_->size()); in TEST_F() 81 ASSERT_EQ(0xa1, data_->at(0)); in TEST_F() 82 ASSERT_EQ(0xa2, data_->at(1)); in TEST_F() 83 ASSERT_EQ(0xa3, data_->at(2)); in TEST_F() [all …]
|
D | DwarfCfaLogTest.cpp | 85 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P() 86 ASSERT_EQ("", GetFakeLogBuf()); in TYPED_TEST_P() 97 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P() 98 ASSERT_EQ("", GetFakeLogBuf()); in TYPED_TEST_P() 108 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P() 109 ASSERT_EQ("", GetFakeLogBuf()); in TYPED_TEST_P() 118 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P() 119 ASSERT_EQ("", GetFakeLogBuf()); in TYPED_TEST_P() 129 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P() 130 ASSERT_EQ("", GetFakeLogBuf()); in TYPED_TEST_P() [all …]
|
D | RegsTest.cpp | 85 ASSERT_EQ(50U, regs32.total_regs()); in TEST_F() 86 ASSERT_EQ(10U, regs32.sp_reg()); in TEST_F() 96 ASSERT_EQ(0xf0000000U + i, regs32[i]) << "Failed comparing register " << i; in TEST_F() 99 ASSERT_EQ(0xf0120340U, regs32.pc()); in TEST_F() 100 ASSERT_EQ(0xa0ab0cd0U, regs32.sp()); in TEST_F() 103 ASSERT_EQ(10U, regs32[32]); in TEST_F() 108 ASSERT_EQ(30U, regs64.total_regs()); in TEST_F() 109 ASSERT_EQ(12U, regs64.sp_reg()); in TEST_F() 119 ASSERT_EQ(0xf123456780000000U + i, regs64[i]) << "Failed reading register " << i; in TEST_F() 122 ASSERT_EQ(0xf123456780102030UL, regs64.pc()); in TEST_F() [all …]
|
D | DwarfMemoryTest.cpp | 65 ASSERT_EQ(0x10U, byte); in TEST_F() 67 ASSERT_EQ(0x18U, byte); in TEST_F() 69 ASSERT_EQ(0xffU, byte); in TEST_F() 71 ASSERT_EQ(0xfeU, byte); in TEST_F() 72 ASSERT_EQ(4U, dwarf_mem_->cur_offset()); in TEST_F() 76 ASSERT_EQ(0xffU, byte); in TEST_F() 77 ASSERT_EQ(3U, dwarf_mem_->cur_offset()); in TEST_F() 87 ASSERT_EQ(static_cast<int8_t>(-10), static_cast<int8_t>(value)); in TEST_F() 89 ASSERT_EQ(static_cast<int8_t>(200), static_cast<int8_t>(value)); in TEST_F() 96 ASSERT_EQ(static_cast<int16_t>(-1000), static_cast<int16_t>(value)); in TEST_F() [all …]
|
D | ElfInterfaceArmTest.cpp | 49 ASSERT_EQ(0x231000U, value); in TEST_F() 53 ASSERT_EQ(0x2000U, value); in TEST_F() 57 ASSERT_EQ(0xf0002000U, value); in TEST_F() 105 ASSERT_EQ(0x8000U, entry_offset); in TEST_F() 117 ASSERT_EQ(0x1000U, entry_offset); in TEST_F() 129 ASSERT_EQ(0x1000U, entry_offset); in TEST_F() 135 ASSERT_EQ(0x1000U, entry_offset); in TEST_F() 147 ASSERT_EQ(0x1008U, entry_offset); in TEST_F() 154 ASSERT_EQ(0x1008U, entry_offset); in TEST_F() 168 ASSERT_EQ(0x1010U, entry_offset); in TEST_F() [all …]
|
/system/core/base/ |
D | endian_test.cpp | 26 ASSERT_EQ(__LITTLE_ENDIAN, __BYTE_ORDER); in TEST() 38 ASSERT_EQ(be16, htons(le16)); in TEST() 39 ASSERT_EQ(be32, htonl(le32)); in TEST() 40 ASSERT_EQ(be64, htonq(le64)); in TEST() 42 ASSERT_EQ(le16, ntohs(be16)); in TEST() 43 ASSERT_EQ(le32, ntohl(be32)); in TEST() 44 ASSERT_EQ(le64, ntohq(be64)); in TEST() 46 ASSERT_EQ(be16, htobe16(le16)); in TEST() 47 ASSERT_EQ(be32, htobe32(le32)); in TEST() 48 ASSERT_EQ(be64, htobe64(le64)); in TEST() [all …]
|
D | strings_test.cpp | 28 ASSERT_EQ(1U, parts.size()); in TEST() 29 ASSERT_EQ("", parts[0]); in TEST() 34 ASSERT_EQ(1U, parts.size()); in TEST() 35 ASSERT_EQ("foo", parts[0]); in TEST() 40 ASSERT_EQ(3U, parts.size()); in TEST() 41 ASSERT_EQ("foo", parts[0]); in TEST() 42 ASSERT_EQ("bar", parts[1]); in TEST() 43 ASSERT_EQ("baz", parts[2]); in TEST() 48 ASSERT_EQ(3U, parts.size()); in TEST() 49 ASSERT_EQ("foo", parts[0]); in TEST() [all …]
|
D | parseint_test.cpp | 27 ASSERT_EQ(123, i); in TEST() 29 ASSERT_EQ(-123, i); in TEST() 33 ASSERT_EQ(1234, s); in TEST() 36 ASSERT_EQ(12, i); in TEST() 47 ASSERT_EQ(123u, i); in TEST() 52 ASSERT_EQ(1234u, s); in TEST() 55 ASSERT_EQ(12u, i); in TEST() 63 ASSERT_EQ(123, i); in TEST() 67 ASSERT_EQ(123u, u); in TEST() 73 ASSERT_EQ(0x123, i); in TEST() [all …]
|
/system/core/libziparchive/ |
D | zip_writer_test.cc | 53 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F() 54 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F() 55 ASSERT_EQ(0, writer.WriteBytes("llo", 3)); in TEST_F() 56 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F() 57 ASSERT_EQ(0, writer.Finish()); in TEST_F() 62 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F() 65 ASSERT_EQ(0, FindEntry(handle, ZipString("file.txt"), &data)); in TEST_F() 69 ASSERT_EQ(strlen(expected), data.uncompressed_length); in TEST_F() 78 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F() 79 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F() [all …]
|
D | zip_archive_test.cc | 68 ASSERT_EQ(name_str.size(), name.name_length); in AssertNameEquals() 69 ASSERT_EQ(0, memcmp(name_str.c_str(), name.name, name.name_length)); in AssertNameEquals() 79 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle)); in TEST() 82 ASSERT_EQ(-1, OpenArchiveWrapper(kBadFilenameZip, &handle)); in TEST() 88 ASSERT_EQ(-8, OpenArchiveWrapper(kCrashApk, &handle)); in TEST() 97 ASSERT_EQ(-1, GetFileDescriptor(handle)); in TEST() 104 ASSERT_EQ(0, OpenArchiveFd(fd, "OpenWithAssumeFdOwnership", &handle)); in TEST() 106 ASSERT_EQ(-1, lseek(fd, 0, SEEK_SET)); in TEST() 107 ASSERT_EQ(EBADF, errno); in TEST() 114 ASSERT_EQ(0, OpenArchiveFd(fd, "OpenWithAssumeFdOwnership", &handle, false)); in TEST() [all …]
|
/system/core/trusty/storage/tests/ |
D | main.cpp | 87 ASSERT_EQ(0, rc); in SetUp() 139 ASSERT_EQ((int)chunk_len, rc); in WriteZeroChunk() 155 ASSERT_EQ((int)chunk_len, rc); in WritePatternChunk() 185 ASSERT_EQ(head_len + pattern_len + tail_len, chunk_len); in ReadChunk() 188 ASSERT_EQ((int)chunk_len, rc); in ReadChunk() 220 ASSERT_EQ((int)chunk_len, rc); in ReadPattern() 247 ASSERT_EQ(bytes_read, exp_len); in ReadPatternEOF() 258 ASSERT_EQ(0, rc); in TEST_P() 262 ASSERT_EQ(-ENOENT, rc); in TEST_P() 268 ASSERT_EQ(0, rc); in TEST_P() [all …]
|
/system/core/libion/tests/ |
D | device_test.cpp | 55 ASSERT_EQ(0, close(m_deviceFd)); in TearDown() 61 ASSERT_EQ(0, ioctl(m_deviceFd, ION_IOC_TEST_SET_FD, fd)); in readDMA() 69 ASSERT_EQ(0, ioctl(m_deviceFd, ION_IOC_TEST_DMA_MAPPING, &ion_test_rw_data)); in readDMA() 70 ASSERT_EQ(0, ioctl(m_deviceFd, ION_IOC_TEST_SET_FD, -1)); in readDMA() 75 ASSERT_EQ(0, ioctl(m_deviceFd, ION_IOC_TEST_SET_FD, fd)); in writeDMA() 83 ASSERT_EQ(0, ioctl(m_deviceFd, ION_IOC_TEST_DMA_MAPPING, &ion_test_rw_data)); in writeDMA() 84 ASSERT_EQ(0, ioctl(m_deviceFd, ION_IOC_TEST_SET_FD, -1)); in writeDMA() 89 ASSERT_EQ(0, ioctl(m_deviceFd, ION_IOC_TEST_SET_FD, fd)); in readKernel() 97 ASSERT_EQ(0, ioctl(m_deviceFd, ION_IOC_TEST_KERNEL_MAPPING, &ion_test_rw_data)); in readKernel() 98 ASSERT_EQ(0, ioctl(m_deviceFd, ION_IOC_TEST_SET_FD, -1)); in readKernel() [all …]
|
D | map_test.cpp | 37 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle)); in TEST_F() 42 …ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd)); in TEST_F() 46 ASSERT_EQ(0, close(map_fd)); in TEST_F() 48 ASSERT_EQ(0, ion_free(m_ionFd, handle)); in TEST_F() 52 ASSERT_EQ(0, munmap(ptr, size)); in TEST_F() 66 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, size, 0, heapMask, 0, &map_fd)); in TEST_F() 73 ASSERT_EQ(0, close(map_fd)); in TEST_F() 77 ASSERT_EQ(0, munmap(ptr, size)); in TEST_F() 88 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, PAGE_SIZE * 2, 0, heapMask, 0, &map_fd)); in TEST_F() 98 ASSERT_EQ(0, munmap(ptr, PAGE_SIZE * 2)); in TEST_F() [all …]
|
/system/core/adb/sysdeps/ |
D | stat_test.cpp | 30 ASSERT_EQ(0, stat(td.path, &st)); in TEST() 34 ASSERT_EQ(0, stat((std::string(td.path) + '/').c_str(), &st)); in TEST() 38 ASSERT_EQ(0, stat((std::string(td.path) + '\\').c_str(), &st)); in TEST() 43 ASSERT_EQ(-1, stat(nonexistent_path.c_str(), &st)); in TEST() 44 ASSERT_EQ(ENOENT, errno); in TEST() 46 ASSERT_EQ(-1, stat((nonexistent_path + "/").c_str(), &st)); in TEST() 47 ASSERT_EQ(ENOENT, errno); in TEST() 50 ASSERT_EQ(-1, stat((nonexistent_path + "\\").c_str(), &st)); in TEST() 51 ASSERT_EQ(ENOENT, errno); in TEST() 54 ASSERT_EQ(0, stat(tf.path, &st)); in TEST() [all …]
|
/system/core/libprocinfo/ |
D | process_test.cpp | 45 ASSERT_EQ(gettid(), self.tid); in TEST() 46 ASSERT_EQ(getpid(), self.pid); in TEST() 47 ASSERT_EQ(getppid(), self.ppid); in TEST() 48 ASSERT_EQ(getuid(), self.uid); in TEST() 49 ASSERT_EQ(getgid(), self.gid); in TEST() 59 ASSERT_EQ("libprocinfo_tes", self.name); in TEST() 60 ASSERT_EQ(gettid(), self.tid); in TEST() 61 ASSERT_EQ(getpid(), self.pid); in TEST() 62 ASSERT_EQ(getppid(), self.ppid); in TEST() 63 ASSERT_EQ(getuid(), self.uid); in TEST() [all …]
|
/system/core/adb/ |
D | transport_test.cpp | 32 ASSERT_EQ(1u, kick_count); in TEST() 36 ASSERT_EQ(1u, kick_count); in TEST() 55 ASSERT_EQ(1, count); in TEST() 59 ASSERT_EQ(1, count); in TEST() 65 ASSERT_EQ(0, count); in TEST() 70 ASSERT_EQ(0U, t.features().size()); in TEST() 73 ASSERT_EQ(1U, t.features().size()); in TEST() 77 ASSERT_EQ(2U, t.features().size()); in TEST() 82 ASSERT_EQ(2U, t.features().size()); in TEST() 87 ASSERT_EQ(2U, t.features().size()); in TEST() [all …]
|
/system/keymaster/ |
D | key_blob_test.cpp | 100 ASSERT_EQ(KM_ERROR_OK, Encrypt()); in TEST_F() 101 ASSERT_EQ(KM_ERROR_OK, Serialize()); in TEST_F() 115 ASSERT_EQ(KM_ERROR_OK, DeserializeAuthEncryptedBlob(serialized_blob_, &ciphertext_, &hw2, &sw2, in TEST_F() 123 ASSERT_EQ(key_material_.key_material_size, plaintext.key_material_size); in TEST_F() 128 ASSERT_EQ(KM_ERROR_OK, Encrypt()); in TEST_F() 129 ASSERT_EQ(KM_ERROR_OK, Serialize()); in TEST_F() 134 ASSERT_EQ(KM_ERROR_INVALID_KEY_BLOB, Deserialize()); in TEST_F() 138 ASSERT_EQ(KM_ERROR_OK, Encrypt()); in TEST_F() 139 ASSERT_EQ(KM_ERROR_OK, Serialize()); in TEST_F() 150 ASSERT_EQ(KM_ERROR_OK, Deserialize()); in TEST_F() [all …]
|
/system/core/init/ |
D | init_parser_test.cpp | 35 ASSERT_EQ(nullptr, sm.MakeExecOneshotService(args)); in TEST() 39 ASSERT_EQ(nullptr, sm.MakeExecOneshotService(args)); in TEST() 43 ASSERT_EQ(nullptr, sm.MakeExecOneshotService(args)); in TEST() 58 ASSERT_EQ(nullptr, sm.MakeExecOneshotService(args)); in TEST() 88 ASSERT_EQ("u:r:su:s0", svc->seclabel()); in Test_make_exec_oneshot_service() 90 ASSERT_EQ("", svc->seclabel()); in Test_make_exec_oneshot_service() 96 ASSERT_EQ(decoded_uid, svc->uid()); in Test_make_exec_oneshot_service() 98 ASSERT_EQ(0U, svc->uid()); in Test_make_exec_oneshot_service() 104 ASSERT_EQ(decoded_uid, svc->gid()); in Test_make_exec_oneshot_service() 106 ASSERT_EQ(0U, svc->gid()); in Test_make_exec_oneshot_service() [all …]
|
/system/core/libsync/tests/ |
D | sync_test.cpp | 280 ASSERT_EQ(fence.wait(0), -1); in TEST() 281 ASSERT_EQ(errno, ETIME); in TEST() 284 ASSERT_EQ(timeline.inc(1), 0); in TEST() 287 ASSERT_EQ(fence.wait(0), -1); in TEST() 288 ASSERT_EQ(errno, ETIME); in TEST() 291 ASSERT_EQ(timeline.inc(4), 0); in TEST() 294 ASSERT_EQ(fence.wait(0), 0); in TEST() 297 ASSERT_EQ(timeline.inc(10), 0); in TEST() 298 ASSERT_EQ(fence.wait(0), 0); in TEST() 314 ASSERT_EQ(select(fence.getFd() + 1, &set, nullptr, nullptr, &time), 0); in TEST() [all …]
|
/system/extras/memory_replay/tests/ |
D | ThreadsTest.cpp | 30 ASSERT_EQ(1U, threads.num_threads()); in TEST() 33 ASSERT_EQ(thread, found_thread); in TEST() 41 ASSERT_EQ(0U, threads.num_threads()); in TEST() 50 ASSERT_EQ(1U, threads.num_threads()); in TEST() 54 ASSERT_EQ(2U, threads.num_threads()); in TEST() 58 ASSERT_EQ(3U, threads.num_threads()); in TEST() 61 ASSERT_EQ(thread1, found_thread1); in TEST() 64 ASSERT_EQ(thread2, found_thread2); in TEST() 67 ASSERT_EQ(thread3, found_thread3); in TEST() 75 ASSERT_EQ(2U, threads.num_threads()); in TEST() [all …]
|