[libc] Removed public function calls in table.h (#144168)
Removed strcmp, strlen, and memset calls from table.h and replaced them with internal functions. --------- Co-authored-by: Sriya Pratipati <sriyap@google.com>
This commit is contained in:
@@ -108,7 +108,9 @@ TEST(LlvmLibcTableTest, Insertion) {
|
||||
static_cast<void *>(keys[CAP].bytes));
|
||||
|
||||
for (size_t i = 0; i <= CAP; ++i) {
|
||||
ASSERT_EQ(strcmp(table->find(keys[i].bytes)->key, keys[i].bytes), 0);
|
||||
auto comp = [](char l, char r) -> int { return l - r; };
|
||||
ASSERT_EQ(
|
||||
inline_strcmp(table->find(keys[i].bytes)->key, keys[i].bytes, comp), 0);
|
||||
}
|
||||
for (size_t i = CAP + 1; i < 256; ++i) {
|
||||
ASSERT_EQ(table->find(keys[i].bytes), static_cast<ENTRY *>(nullptr));
|
||||
|
||||
Reference in New Issue
Block a user