[libc] Support running tests for Pigweed
authorAlex Brachet <abrachet@google.com>
Thu, 16 Feb 2023 16:38:19 +0000 (16:38 +0000)
committerAlex Brachet <abrachet@google.com>
Thu, 16 Feb 2023 16:39:09 +0000 (16:39 +0000)
Differential Revision: https://reviews.llvm.org/D144146

libc/test/UnitTest/PigweedTest.h [new file with mode: 0644]
libc/test/UnitTest/Test.h

diff --git a/libc/test/UnitTest/PigweedTest.h b/libc/test/UnitTest/PigweedTest.h
new file mode 100644 (file)
index 0000000..f3b33b7
--- /dev/null
@@ -0,0 +1,18 @@
+//===-- Header for setting up the Pigweed tests -----------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_UTILS_UNITTEST_PIGWEEDTEST_H
+#define LLVM_LIBC_UTILS_UNITTEST_PIGWEEDTEST_H
+
+#include <gtest/gtest.h>
+
+namespace __llvm_libc::testing {
+using Test = ::testing::Test;
+}
+
+#endif // LLVM_LIBC_UTILS_UNITTEST_PIGWEEDTEST_H
index 60dfcbf..19c4149 100644 (file)
@@ -11,6 +11,8 @@
 
 #ifdef LIBC_COPT_TEST_USE_FUCHSIA
 #include "FuchsiaTest.h"
+#elif defined(LIBC_COPT_TEST_USE_PIGWEED)
+#include "PigweedTest.h"
 #else
 #include "LibcTest.h"
 #endif