/bionic/tests/ |
D | string_test.cpp | 1557 const char haystack[] = "big\0daddy/giant\0haystacks!"; in TEST() local 1563 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "", 0)); in TEST() 1565 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "b", 1)); in TEST() 1566 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "bi", 2)); in TEST() 1567 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "big", 3)); in TEST() 1568 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "big\0", 4)); in TEST() 1569 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "big\0d", 5)); in TEST() 1571 ASSERT_EQ(haystack + 2, memmem(haystack, sizeof(haystack), "g", 1)); in TEST() 1572 ASSERT_EQ(haystack + 10, memmem(haystack, sizeof(haystack), "gi", 2)); in TEST() 1573 ASSERT_EQ(haystack + 10, memmem(haystack, sizeof(haystack), "gia", 3)); in TEST() [all …]
|
D | wchar_test.cpp | 232 const wchar_t* haystack = L"big daddy/giant haystacks!"; in TEST() local 236 ASSERT_EQ(haystack, wcsstr(haystack, L"")); in TEST() 239 ASSERT_EQ(haystack, wcsstr(haystack, L"b")); in TEST() 240 ASSERT_EQ(haystack, wcsstr(haystack, L"big")); in TEST() 241 ASSERT_EQ(haystack + 9, wcsstr(haystack, L"/")); in TEST() 242 ASSERT_EQ(haystack + 9, wcsstr(haystack, L"/giant")); in TEST() 243 ASSERT_EQ(haystack + 25, wcsstr(haystack, L"!")); in TEST() 244 ASSERT_EQ(haystack + 19, wcsstr(haystack, L"stacks!")); in TEST() 246 ASSERT_EQ(nullptr, wcsstr(haystack, L"monkey")); in TEST()
|
D | dlfcn_test.cpp | 44 #define ASSERT_SUBSTR(needle, haystack) \ argument 45 ASSERT_PRED_FORMAT2(::testing::IsSubstring, needle, haystack)
|
D | dlext_test.cpp | 57 #define ASSERT_SUBSTR(needle, haystack) \ argument 58 ASSERT_PRED_FORMAT2(::testing::IsSubstring, needle, haystack)
|
/bionic/linker/ |
D | linker_utils.cpp | 121 const char* haystack = file.c_str(); in file_is_in_dir() local 124 return strncmp(haystack, needle, needle_len) == 0 && in file_is_in_dir() 125 haystack[needle_len] == '/' && in file_is_in_dir() 126 strchr(haystack + needle_len + 1, '/') == nullptr; in file_is_in_dir() 131 const char* haystack = file.c_str(); in file_is_under_dir() local 134 return strncmp(haystack, needle, needle_len) == 0 && in file_is_under_dir() 135 haystack[needle_len] == '/'; in file_is_under_dir()
|
/bionic/benchmarks/ |
D | string_benchmark.cpp | 271 std::vector<char> haystack; in BM_string_strstr() local 273 char* haystack_aligned = GetAlignedPtrFilled(&haystack, haystack_alignment, nbytes, 'x'); in BM_string_strstr() 299 std::vector<char> haystack; in BM_string_strchr() local 300 char* haystack_aligned = GetAlignedPtrFilled(&haystack, haystack_alignment, nbytes, 'x'); in BM_string_strchr()
|
/bionic/libc/bionic/ |
D | ndk_cruft.cpp | 238 wchar_t* wcswcs(wchar_t* haystack, wchar_t* needle) { in wcswcs() argument 239 return wcsstr(haystack, needle); in wcswcs()
|