[libc][NFC] Move UnitTest and IntegrationTest to the 'test' directory.
This part of the effort to make all test related pieces into the `test` directory. This helps is excluding test related pieces in a straight forward manner if LLVM_INCLUDE_TESTS is OFF. Future patches will also move the MPFR wrapper and testutils into the 'test' directory.
This commit is contained in:
parent
d27fb5efc5
commit
af1315c28f
|
@ -443,7 +443,7 @@ function(add_integration_test test_name)
|
|||
libc.src.stdlib.atexit
|
||||
libc.src.stdlib.exit
|
||||
libc.src.unistd.environ
|
||||
libc.utils.IntegrationTest.test)
|
||||
libc.test.IntegrationTest.test)
|
||||
list(REMOVE_DUPLICATES fq_deps_list)
|
||||
|
||||
# TODO: Instead of gathering internal object files from entrypoints,
|
||||
|
@ -526,7 +526,7 @@ function(add_integration_test test_name)
|
|||
add_dependencies(${fq_target_name}
|
||||
${fq_target_name}.__copy_startup__
|
||||
${fq_libc_target_name}
|
||||
libc.utils.IntegrationTest.test
|
||||
libc.test.IntegrationTest.test
|
||||
${INTEGRATION_TEST_DEPENDS})
|
||||
|
||||
add_custom_command(
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
add_subdirectory(UnitTest)
|
||||
|
||||
if(LLVM_LIBC_FULL_BUILD AND NOT
|
||||
(LIBC_TARGET_ARCHITECTURE_IS_GPU OR LIBC_TARGET_OS_IS_BAREMETAL))
|
||||
add_subdirectory(IntegrationTest)
|
||||
endif()
|
||||
|
||||
add_header_library(
|
||||
errno_setter_matcher
|
||||
HDRS
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#ifndef LLVM_LIBC_TEST_ERRNOSETTERMATCHER_H
|
||||
#define LLVM_LIBC_TEST_ERRNOSETTERMATCHER_H
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ target_link_libraries(LibcFPTestHelpers LibcUnitTest libc_test_utils)
|
|||
add_dependencies(
|
||||
LibcFPTestHelpers
|
||||
LibcUnitTest
|
||||
libc.utils.UnitTest.string_utils
|
||||
libc.test.UnitTest.string_utils
|
||||
libc.src.__support.FPUtil.fp_bits
|
||||
libc.src.__support.FPUtil.fenv_impl
|
||||
)
|
||||
|
@ -67,7 +67,7 @@ add_dependencies(
|
|||
LibcUnitTest
|
||||
libc.src.__support.FPUtil.fp_bits
|
||||
libc.src.stdio.printf_core.core_structs
|
||||
libc.utils.UnitTest.string_utils
|
||||
libc.test.UnitTest.string_utils
|
||||
)
|
||||
|
||||
add_library(
|
||||
|
@ -82,5 +82,5 @@ add_dependencies(
|
|||
LibcUnitTest
|
||||
libc.src.__support.FPUtil.fp_bits
|
||||
libc.src.stdio.scanf_core.core_structs
|
||||
libc.utils.UnitTest.string_utils
|
||||
libc.test.UnitTest.string_utils
|
||||
)
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifndef LLVM_LIBC_TEST_USE_FUCHSIA
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
namespace __llvm_libc {
|
||||
namespace fputil {
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "src/__support/FPUtil/FPBits.h"
|
||||
|
||||
#include "utils/UnitTest/StringUtils.h"
|
||||
#include "test/UnitTest/StringUtils.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "src/__support/FPUtil/FEnvImpl.h"
|
||||
#include "src/__support/FPUtil/FPBits.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
#include "utils/testutils/RoundingModeUtils.h"
|
||||
|
||||
#include <errno.h>
|
|
@ -57,7 +57,9 @@ struct MatcherBase {
|
|||
virtual bool is_silent() const { return false; }
|
||||
};
|
||||
|
||||
template <typename T> struct Matcher : public MatcherBase { bool match(T &t); };
|
||||
template <typename T> struct Matcher : public MatcherBase {
|
||||
bool match(T &t);
|
||||
};
|
||||
|
||||
// NOTE: One should not create instances and call methods on them directly. One
|
||||
// should use the macros TEST or TEST_F to write test cases.
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "src/__support/CPP/span.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
namespace __llvm_libc {
|
||||
namespace memory {
|
|
@ -11,7 +11,7 @@
|
|||
#include "src/__support/FPUtil/FPBits.h"
|
||||
#include "src/stdio/printf_core/core_structs.h"
|
||||
|
||||
#include "utils/UnitTest/StringUtils.h"
|
||||
#include "test/UnitTest/StringUtils.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#define LLVM_LIBC_UTILS_UNITTEST_PRINTF_MATCHER_H
|
||||
|
||||
#include "src/stdio/printf_core/core_structs.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#include "src/__support/FPUtil/FPBits.h"
|
||||
#include "src/stdio/scanf_core/core_structs.h"
|
||||
|
||||
#include "utils/UnitTest/StringUtils.h"
|
||||
#include "test/UnitTest/StringUtils.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#define LLVM_LIBC_UTILS_UNITTEST_SCANF_MATCHER_H
|
||||
|
||||
#include "src/stdio/scanf_core/core_structs.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/__support/threads/mutex.h"
|
||||
#include "src/__support/threads/thread.h"
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
__llvm_libc::Mutex mutex(false, false, false);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/threads/thread.h"
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
static constexpr int INIT_VAL = 100;
|
||||
static constexpr int UPDATE_VAL = 123;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "src/pthread/pthread_mutex_unlock.h"
|
||||
#include "src/pthread/pthread_self.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "src/pthread/pthread_create.h"
|
||||
#include "src/pthread/pthread_exit.h"
|
||||
#include "src/pthread/pthread_join.h"
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "src/pthread/pthread_create.h"
|
||||
#include "src/pthread/pthread_join.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "src/pthread/pthread_self.h"
|
||||
#include "src/pthread/pthread_setname_np.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "src/pthread/pthread_mutex_unlock.h"
|
||||
#include "src/pthread/pthread_once.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/pthread/pthread_create.h"
|
||||
#include "src/pthread/pthread_join.h"
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "src/pthread/pthread_key_create.h"
|
||||
#include "src/pthread/pthread_key_delete.h"
|
||||
#include "src/pthread/pthread_setspecific.h"
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "src/spawn/posix_spawn_file_actions_destroy.h"
|
||||
#include "src/spawn/posix_spawn_file_actions_init.h"
|
||||
#include "src/sys/wait/waitpid.h"
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <spawn.h>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "src/stdio/sprintf.h"
|
||||
#endif
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
static bool my_streq(const char *lhs, const char *rhs) {
|
||||
if (lhs == rhs)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/stdlib/getenv.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
static bool my_streq(const char *lhs, const char *rhs) {
|
||||
if (lhs == rhs)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "src/threads/thrd_create.h"
|
||||
#include "src/threads/thrd_join.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <threads.h>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "src/threads/thrd_create.h"
|
||||
#include "src/threads/thrd_join.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <threads.h>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "src/threads/thrd_create.h"
|
||||
#include "src/threads/thrd_join.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <threads.h>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "src/threads/thrd_equal.h"
|
||||
#include "src/threads/thrd_join.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <threads.h>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "src/threads/thrd_create.h"
|
||||
#include "src/threads/thrd_exit.h"
|
||||
#include "src/threads/thrd_join.h"
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <threads.h>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "src/threads/thrd_create.h"
|
||||
#include "src/threads/thrd_join.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <threads.h>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "src/threads/tss_delete.h"
|
||||
#include "src/threads/tss_get.h"
|
||||
#include "src/threads/tss_set.h"
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <threads.h>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "src/unistd/execv.h"
|
||||
#include "src/unistd/fork.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "src/unistd/execve.h"
|
||||
#include "src/unistd/fork.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "src/sys/wait/waitpid.h"
|
||||
#include "src/unistd/fork.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "src/stdlib/getenv.h"
|
||||
#include "src/unistd/getcwd.h"
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h> // For malloc and free
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
static bool my_streq(const char *lhs, const char *rhs) {
|
||||
const char *l, *r;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
TEST_MAIN() { return 0; }
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
TEST_MAIN(int argc, char **argv) { return 0; }
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "src/errno/llvmlibc_errno.h"
|
||||
#include "src/sys/mman/mmap.h"
|
||||
#include "utils/IntegrationTest/test.h"
|
||||
#include "test/IntegrationTest/test.h"
|
||||
|
||||
constexpr int threadLocalDataSize = 101;
|
||||
_Thread_local int a[threadLocalDataSize] = {123};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/CPP/atomic.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
// Tests in this file do not test atomicity as it would require using
|
||||
// threads, at which point it becomes a chicken and egg problem.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/CPP/bitset.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcBitsetTest, SetBitForSizeEqualToOne) {
|
||||
__llvm_libc::cpp::bitset<1> bitset;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/CPP/cstddef.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
namespace __llvm_libc::cpp {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/CPP/utility.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
using namespace __llvm_libc::cpp;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/__support/CPP/limits.h"
|
||||
#include "src/__support/UInt.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
namespace __llvm_libc {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/CPP/optional.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
using __llvm_libc::cpp::nullopt;
|
||||
using __llvm_libc::cpp::optional;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/__support/CPP/array.h"
|
||||
#include "src/__support/CPP/span.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
using __llvm_libc::cpp::array;
|
||||
using __llvm_libc::cpp::span;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/__support/CPP/span.h"
|
||||
#include "src/__support/CPP/stringstream.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
using __llvm_libc::cpp::span;
|
||||
using __llvm_libc::cpp::StringStream;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/CPP/string_view.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
using __llvm_libc::cpp::string_view;
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
#include "src/__support/FPUtil/dyadic_float.h"
|
||||
#include "src/__support/UInt.h"
|
||||
#include "test/UnitTest/FPMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
#include "utils/MPFRWrapper/MPFRUtils.h"
|
||||
#include "utils/UnitTest/FPMatcher.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
|
||||
using Float128 = __llvm_libc::fputil::DyadicFloat<128>;
|
||||
using Float192 = __llvm_libc::fputil::DyadicFloat<192>;
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include "src/__support/CPP/new.h"
|
||||
#include "src/__support/File/file.h"
|
||||
#include "src/__support/error_or.h"
|
||||
#include "utils/UnitTest/MemoryMatcher.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/MemoryMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/File/file.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <stdio.h> // For SEEK_* macros
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/__support/CPP/functional.h"
|
||||
#include "src/__support/OSUtil/syscall.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcX86_64_SyscallTest, APITest) {
|
||||
// We only do a signature test here. Actual functionality tests are
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/__support/arg_list.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
int get_nth_int(int n, ...) {
|
||||
va_list vlist;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/blockstore.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
struct Element {
|
||||
int a;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/char_vector.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
using __llvm_libc::CharVector;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/endian.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
namespace __llvm_libc {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/__support/fixedvector.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcFixedVectorTest, PushAndPop) {
|
||||
__llvm_libc::FixedVector<int, 20> fixed_vector;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "src/__support/UInt128.h"
|
||||
#include "src/__support/high_precision_decimal.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcHighPrecisionDecimalTest, BasicInit) {
|
||||
__llvm_libc::internal::HighPrecisionDecimal hpd =
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "src/__support/CPP/string_view.h"
|
||||
#include "src/__support/integer_to_string.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include "limits.h"
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "src/__support/UInt128.h"
|
||||
#include "src/__support/str_to_float.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
class LlvmLibcStrToFloatTest : public __llvm_libc::testing::Test {
|
||||
public:
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "src/__support/CPP/optional.h"
|
||||
#include "src/__support/UInt.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
// We want to test __llvm_libc::cpp::UInt<128> explicitly. So, for convenience,
|
||||
// we use a sugar which does not conflict with the UInt128 type which can
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#undef NDEBUG
|
||||
#include "src/assert/assert.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
extern "C" int close(int);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/ctype/isalnum.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsAlNum, DefaultLocale) {
|
||||
// Loops through all characters, verifying that numbers and letters
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/ctype/isalpha.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsAlpha, DefaultLocale) {
|
||||
// Loops through all characters, verifying that letters return a
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include "src/ctype/isascii.h"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/isblank.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsBlank, DefaultLocale) {
|
||||
// Loops through all characters, verifying that space and horizontal tab
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/iscntrl.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsCntrl, DefaultLocale) {
|
||||
// Loops through all characters, verifying that control characters
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/ctype/isdigit.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsDigit, DefaultLocale) {
|
||||
// Loops through all characters, verifying that numbers return a
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/isgraph.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsGraph, DefaultLocale) {
|
||||
// Loops through all characters, verifying that graphical characters
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/islower.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsLower, DefaultLocale) {
|
||||
// Loops through all characters, verifying that lowercase letters
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/isprint.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsPrint, DefaultLocale) {
|
||||
for (int ch = 0; ch < 255; ++ch) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/ispunct.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
// Helper function to mark the sections of the ASCII table that are
|
||||
// punctuation characters. These are listed below:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/isspace.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsSpace, DefaultLocale) {
|
||||
// Loops through all characters, verifying that space characters
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/isupper.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsUpper, DefaultLocale) {
|
||||
// Loops through all characters, verifying that uppercase letters
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/isxdigit.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcIsXDigit, DefaultLocale) {
|
||||
for (int ch = 0; ch < 255; ++ch) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "src/ctype/toascii.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcToAscii, DefaultLocale) {
|
||||
// Loops through all characters, verifying that ascii characters
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/tolower.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcToLower, DefaultLocale) {
|
||||
for (int ch = 0; ch < 255; ++ch) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/ctype/toupper.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcToUpper, DefaultLocale) {
|
||||
for (int ch = 0; ch < 255; ++ch) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "src/dirent/opendir.h"
|
||||
#include "src/dirent/readdir.h"
|
||||
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/errno/llvmlibc_errno.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
TEST(LlvmLibcErrnoTest, Basic) {
|
||||
int test_val = 123;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "src/fcntl/open.h"
|
||||
#include "src/unistd/close.h"
|
||||
#include "test/ErrnoSetterMatcher.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
#include "utils/testutils/FDReader.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "src/unistd/close.h"
|
||||
#include "src/unistd/read.h"
|
||||
#include "test/ErrnoSetterMatcher.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
#include "utils/testutils/FDReader.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
#include "src/__support/FPUtil/FEnvImpl.h"
|
||||
#include "src/__support/macros/architectures.h"
|
||||
#include "utils/UnitTest/FPExceptMatcher.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/FPExceptMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fenv.h>
|
||||
#include <signal.h>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "src/fenv/fesetexceptflag.h"
|
||||
|
||||
#include "src/__support/FPUtil/FEnvImpl.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fenv.h>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "src/fenv/fetestexcept.h"
|
||||
|
||||
#include "src/__support/FPUtil/FEnvImpl.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fenv.h>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "src/fenv/feclearexcept.h"
|
||||
|
||||
#include "src/__support/FPUtil/FEnvImpl.h"
|
||||
#include "utils/UnitTest/Test.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fenv.h>
|
||||
#include <stdint.h>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user