aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2016-03-02 21:56:36 +0000
committerChristopher Ferris <cferris@google.com>2016-03-02 14:27:29 -0800
commit0978b5e00586b4f7f1f8eddb2ffd41a92e4e1712 (patch)
tree852e2bd4f3bf282ccdabbeb5ce73aee3aaa14aca /test
parent639da5fd139d7033d893c4b35a9cd22b522960c3 (diff)
downloadjemalloc-0978b5e00586b4f7f1f8eddb2ffd41a92e4e1712.tar.gz
Revert "Fix the ckh unit test."
This reverts commit 14d6af1aa29cffc323606f2c41c531f3b64f4072. Bug: 26807329 Change-Id: I4ebdf57229e3683781ea16b0801813c69414ce7b
Diffstat (limited to 'test')
-rw-r--r--test/unit/ckh.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/test/unit/ckh.c b/test/unit/ckh.c
index 08cff6c..b117595 100644
--- a/test/unit/ckh.c
+++ b/test/unit/ckh.c
@@ -27,9 +27,7 @@ TEST_BEGIN(test_count_insert_search_remove)
"a string.",
"A string."
};
- /* ANDROID change */
- /* const char *missing = "A string not in the hash table."; */
- /* End ANDROID change */
+ const char *missing = "A string not in the hash table.";
size_t i;
tsd = tsd_fetch();
@@ -71,16 +69,8 @@ TEST_BEGIN(test_count_insert_search_remove)
assert_ptr_eq((void *)vs, (void *)v.s, "Value mismatch, i=%zu",
i);
}
- /* ANDROID change */
- {
- /* The searchkey parameter must be 4 byte aligned. */
- #define HASH_TABLE_STRING "A string not in the hash table."
- union { char char_data[sizeof(HASH_TABLE_STRING)]; uint32_t uint_data; } missing;
- memcpy(missing.char_data, HASH_TABLE_STRING, sizeof(HASH_TABLE_STRING));
- assert_true(ckh_search(&ckh, missing.char_data, NULL, NULL),
- "Unexpected ckh_search() success");
- }
- /* End ANDROID change */
+ assert_true(ckh_search(&ckh, missing, NULL, NULL),
+ "Unexpected ckh_search() success");
/* Remove. */
for (i = 0; i < sizeof(strs)/sizeof(const char *); i++) {