summaryrefslogtreecommitdiffstats
path: root/tests/string_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-06-12 15:35:22 -0700
committerElliott Hughes <enh@google.com>2014-06-12 15:35:22 -0700
commit24614b4729a4c8665193f5793b93019b37f779b1 (patch)
tree52631806852b1c584e50f04981e1f64d99106d3f /tests/string_test.cpp
parent346fa721ca20e481a624930425d823d452e11dfe (diff)
downloadbionic-24614b4729a4c8665193f5793b93019b37f779b1.zip
bionic-24614b4729a4c8665193f5793b93019b37f779b1.tar.gz
bionic-24614b4729a4c8665193f5793b93019b37f779b1.tar.bz2
Remove __memcmp16 from bionic.
Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
Diffstat (limited to 'tests/string_test.cpp')
-rw-r--r--tests/string_test.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/string_test.cpp b/tests/string_test.cpp
index 67b3860..a468b97 100644
--- a/tests/string_test.cpp
+++ b/tests/string_test.cpp
@@ -789,37 +789,6 @@ TEST(string, memcmp) {
}
}
-extern "C" int __memcmp16(const unsigned short *ptr1, const unsigned short *ptr2, size_t n);
-
-TEST(string, __memcmp16) {
-#if defined(__BIONIC__)
- StringTestState<unsigned short> state(SMALL);
-
- for (size_t i = 0; i < state.n; i++) {
- for (size_t j = 0; j < POS_ITER; j++) {
- state.NewIteration();
-
- unsigned short mask = 0xffff;
- unsigned short c1 = rand() & mask;
- unsigned short c2 = rand() & mask;
-
- std::fill(state.ptr1, state.ptr1 + state.MAX_LEN, c1);
- std::fill(state.ptr2, state.ptr2 + state.MAX_LEN, c1);
-
- int pos = (state.len[i] == 0) ? 0 : (random() % state.len[i]);
- state.ptr2[pos] = c2;
-
- int expected = (static_cast<unsigned short>(c1) - static_cast<unsigned short>(c2));
- int actual = __memcmp16(state.ptr1, state.ptr2, (size_t) state.MAX_LEN);
-
- ASSERT_EQ(signum(expected), signum(actual));
- }
- }
-#else // __BIONIC__
- GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif // __BIONIC__
-}
-
TEST(string, wmemcmp) {
StringTestState<wchar_t> state(SMALL);