aboutsummaryrefslogtreecommitdiff
path: root/libc/test/src/dirent/dirent_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/test/src/dirent/dirent_test.cpp')
-rw-r--r--libc/test/src/dirent/dirent_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libc/test/src/dirent/dirent_test.cpp b/libc/test/src/dirent/dirent_test.cpp
index 72f9f46..ff1a30a 100644
--- a/libc/test/src/dirent/dirent_test.cpp
+++ b/libc/test/src/dirent/dirent_test.cpp
@@ -17,20 +17,20 @@
#include <dirent.h>
-using string_view = __llvm_libc::cpp::string_view;
+using string_view = LIBC_NAMESPACE::cpp::string_view;
TEST(LlvmLibcDirentTest, SimpleOpenAndRead) {
- ::DIR *dir = __llvm_libc::opendir("testdata");
+ ::DIR *dir = LIBC_NAMESPACE::opendir("testdata");
ASSERT_TRUE(dir != nullptr);
// The file descriptors 0, 1 and 2 are reserved for standard streams.
// So, the file descriptor for the newly opened directory should be
// greater than 2.
- ASSERT_GT(__llvm_libc::dirfd(dir), 2);
+ ASSERT_GT(LIBC_NAMESPACE::dirfd(dir), 2);
struct ::dirent *file1 = nullptr, *file2 = nullptr, *dir1 = nullptr,
*dir2 = nullptr;
while (true) {
- struct ::dirent *d = __llvm_libc::readdir(dir);
+ struct ::dirent *d = LIBC_NAMESPACE::readdir(dir);
if (d == nullptr)
break;
if (string_view(&d->d_name[0]) == "file1.txt")
@@ -51,12 +51,12 @@ TEST(LlvmLibcDirentTest, SimpleOpenAndRead) {
ASSERT_TRUE(dir1 != nullptr);
ASSERT_TRUE(dir2 != nullptr);
- ASSERT_EQ(__llvm_libc::closedir(dir), 0);
+ ASSERT_EQ(LIBC_NAMESPACE::closedir(dir), 0);
}
TEST(LlvmLibcDirentTest, OpenNonExistentDir) {
libc_errno = 0;
- ::DIR *dir = __llvm_libc::opendir("___xyz123__.non_existent__");
+ ::DIR *dir = LIBC_NAMESPACE::opendir("___xyz123__.non_existent__");
ASSERT_TRUE(dir == nullptr);
ASSERT_EQ(libc_errno, ENOENT);
libc_errno = 0;
@@ -64,7 +64,7 @@ TEST(LlvmLibcDirentTest, OpenNonExistentDir) {
TEST(LlvmLibcDirentTest, OpenFile) {
libc_errno = 0;
- ::DIR *dir = __llvm_libc::opendir("testdata/file1.txt");
+ ::DIR *dir = LIBC_NAMESPACE::opendir("testdata/file1.txt");
ASSERT_TRUE(dir == nullptr);
ASSERT_EQ(libc_errno, ENOTDIR);
libc_errno = 0;