[libc-commits] [libc] [libc][test] Adjust header paths in tests (PR #119623)

Caslyn Tonelli via libc-commits libc-commits at lists.llvm.org
Wed Dec 11 14:47:31 PST 2024


https://github.com/Caslyn updated https://github.com/llvm/llvm-project/pull/119623

>From 17a679b5dea50d622144d74e35fc284231fd0936 Mon Sep 17 00:00:00 2001
From: Caslyn Tonelli <caslyn at google.com>
Date: Wed, 11 Dec 2024 14:07:54 -0800
Subject: [PATCH 1/2] [libc][test] Adjust header paths in tests

Since `index_test.cpp` and `rindex_test.cpp` now reside in /strings,
adjust some header paths accordingly.
---
 libc/test/src/strings/index_test.cpp  | 4 ++--
 libc/test/src/strings/rindex_test.cpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libc/test/src/strings/index_test.cpp b/libc/test/src/strings/index_test.cpp
index 88953205009d76..fc4cd2b31c55d1 100644
--- a/libc/test/src/strings/index_test.cpp
+++ b/libc/test/src/strings/index_test.cpp
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "StrchrTest.h"
+#include "test/src/string/StrchrTest.h"
 
-#include "src/string/index.h"
+#include "src/strings/index.h"
 #include "test/UnitTest/Test.h"
 
 STRCHR_TEST(Index, LIBC_NAMESPACE::index)
diff --git a/libc/test/src/strings/rindex_test.cpp b/libc/test/src/strings/rindex_test.cpp
index 10513919cffa2d..d3b756fe5f6e52 100644
--- a/libc/test/src/strings/rindex_test.cpp
+++ b/libc/test/src/strings/rindex_test.cpp
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "StrchrTest.h"
+#include "test/src/string/StrchrTest.h"
 
-#include "src/string/rindex.h"
+#include "src/strings/rindex.h"
 #include "test/UnitTest/Test.h"
 
 STRRCHR_TEST(Rindex, LIBC_NAMESPACE::rindex)

>From 13b6501e3e7e9105bfe7fa35ff48eef44c1109f5 Mon Sep 17 00:00:00 2001
From: Caslyn Tonelli <caslyn at google.com>
Date: Wed, 11 Dec 2024 14:47:03 -0800
Subject: [PATCH 2/2] Adjust dep target

---
 libc/test/src/strings/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libc/test/src/strings/CMakeLists.txt b/libc/test/src/strings/CMakeLists.txt
index 963a1d6d6d60c0..10f96b8531f68f 100644
--- a/libc/test/src/strings/CMakeLists.txt
+++ b/libc/test/src/strings/CMakeLists.txt
@@ -20,7 +20,7 @@ add_libc_test(
     index_test.cpp
   DEPENDS
     libc.src.strings.index
-    libc.test.src.strchr_test_support
+    libc.test.src.string.strchr_test_support
 )
 
 add_libc_test(
@@ -31,7 +31,7 @@ add_libc_test(
     rindex_test.cpp
   DEPENDS
     libc.src.strings.rindex
-    libc.test.src.strchr_test_support
+    libc.test.src.string.strchr_test_support
 )
 
 add_libc_test(



More information about the libc-commits mailing list