[libc] lsearch_test.cpp: put helpers in anonymous namespace. (#137964)

This commit is contained in:
enh-google 2025-04-30 11:55:35 -04:00 committed by GitHub
parent 8836bce842
commit 0e9fb5202c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,10 +9,14 @@
#include "src/search/lsearch.h"
#include "test/UnitTest/Test.h"
namespace {
int compar(const void *a, const void *b) {
return *reinterpret_cast<const int *>(a) != *reinterpret_cast<const int *>(b);
}
} // namespace
TEST(LlvmLibcLsearchTest, SearchHead) {
int list[3] = {1, 2, 3};
size_t len = 3;