Skip to content

Commit 04aaa35

Browse files
[libc][NFC] Correct test header inclusion, license (llvm#114604)
Some tests were including LibcTest.h directly. Instead you should include Test.h which does proper indirection for other test frameworks we support (zxtest, gtest). Also added some license headers to tests that were missing them.
1 parent 61d5add commit 04aaa35

File tree

10 files changed

+25
-7
lines changed

10 files changed

+25
-7
lines changed

libc/test/src/__support/OSUtil/linux/vdso_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "src/signal/raise.h"
2020
#include "src/signal/sigaction.h"
2121
#include "test/UnitTest/ErrnoSetterMatcher.h"
22-
#include "test/UnitTest/LibcTest.h"
2322
#include "test/UnitTest/Test.h"
2423
#include <linux/time_types.h>
2524
#include <sys/syscall.h>

libc/test/src/__support/integer_literals_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
//===-- Unittests for user defined integer literals -----------------------===//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

libc/test/src/__support/str_to_double_test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
//===-- Unittests for str_to_float<double> --------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
19
#include "src/__support/macros/config.h"
210
#include "str_to_fp_test.h"
311

libc/test/src/__support/str_to_float_test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
//===-- Unittests for str_to_float<float> ---------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
19
#include "src/__support/macros/config.h"
210
#include "str_to_fp_test.h"
311

libc/test/src/__support/str_to_long_double_test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
//===-- Unittests for str_to_float<long double> ---------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
19
#include "src/__support/macros/config.h"
210
#include "str_to_fp_test.h"
311

libc/test/src/sys/mman/linux/mincore_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "src/sys/mman/munmap.h"
1717
#include "src/unistd/sysconf.h"
1818
#include "test/UnitTest/ErrnoSetterMatcher.h"
19-
#include "test/UnitTest/LibcTest.h"
2019
#include "test/UnitTest/Test.h"
2120

2221
#include <sys/mman.h>

libc/test/src/sys/mman/linux/mlock_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "src/sys/resource/getrlimit.h"
2121
#include "src/unistd/sysconf.h"
2222
#include "test/UnitTest/ErrnoSetterMatcher.h"
23-
#include "test/UnitTest/LibcTest.h"
2423
#include "test/UnitTest/Test.h"
2524

2625
#include <linux/capability.h>

libc/test/src/sys/mman/linux/msync_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "src/sys/mman/munmap.h"
1515
#include "src/unistd/sysconf.h"
1616
#include "test/UnitTest/ErrnoSetterMatcher.h"
17-
#include "test/UnitTest/LibcTest.h"
1817
#include "test/UnitTest/Test.h"
1918

2019
using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;

libc/test/src/sys/mman/linux/shm_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "src/unistd/close.h"
1717
#include "src/unistd/ftruncate.h"
1818
#include "test/UnitTest/ErrnoSetterMatcher.h"
19-
#include "test/UnitTest/LibcTest.h"
19+
#include "test/UnitTest/Test.h"
2020
#include <sys/syscall.h>
2121

2222
using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;

libc/test/src/unistd/access_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "src/unistd/close.h"
1313
#include "src/unistd/unlink.h"
1414
#include "test/UnitTest/ErrnoSetterMatcher.h"
15-
#include "test/UnitTest/LibcTest.h"
1615
#include "test/UnitTest/Test.h"
1716

1817
#include <sys/stat.h>

0 commit comments

Comments
 (0)