diff options
author | Elliott Hughes <enh@google.com> | 2014-06-13 00:44:19 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-06-12 05:34:11 +0000 |
commit | 5d25d5480ab1e02d8f1e39f5936a3180e84a842c (patch) | |
tree | 91a0e92aedeed1b5862403e525bcfe078d2cf2f8 /tests/string_test.cpp | |
parent | 564222e3384eb1c649bc75650deb847c40ec7da3 (diff) | |
parent | 24614b4729a4c8665193f5793b93019b37f779b1 (diff) |
Merge "Remove __memcmp16 from bionic."
Diffstat (limited to 'tests/string_test.cpp')
-rw-r--r-- | tests/string_test.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/string_test.cpp b/tests/string_test.cpp index 67b3860d1..a468b97fc 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); |