Skip to content

Commit 5ae126e

Browse files
authored
[libc++][C++03] Fix tests which only fail due to incorrect includes (#144110)
Quite a few of the frozen header tests only fail because the include path is incorrect due to copying the headers. This patch fixes the tests where that's the only problem. This is part of https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.
1 parent 9df7824 commit 5ae126e

29 files changed

+32
-93
lines changed

libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@
1010
// that we don't want to support and can't support with LSV enabled.
1111
// UNSUPPORTED: clang-modules-build
1212

13-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
14-
1513
// Sometimes C++'s <foo.h> headers get included within extern "C" contexts. This
1614
// is ill-formed (no diagnostic required), per [using.headers]p3, but we permit
1715
// it as an extension.
1816

19-
#include <__config>
20-
2117
extern "C" {
2218
#include <assert.h>
2319
// complex.h is not supported in extern "C".

libcxx/test/libcxx-03/algorithms/half_positive.pass.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
// __half_positive divides an integer number by 2 as unsigned number for known types.
1212
// It can be an important optimization for lower bound, for example.
1313

14-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
15-
16-
#include <__algorithm/half_positive.h>
14+
#include <__cxx03/__algorithm/half_positive.h>
1715
#include <cassert>
1816
#include <cstddef>
1917
#include <limits>

libcxx/test/libcxx-03/assertions/default_verbose_abort.pass.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
// Test that the default verbose termination function aborts the program.
1010
// XFAIL: availability-verbose_abort-missing
1111

12-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
13-
14-
#include <__verbose_abort>
12+
#include <__cxx03/__verbose_abort>
1513
#include <csignal>
1614
#include <cstdlib>
1715

libcxx/test/libcxx-03/assertions/modes/none.pass.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
// REQUIRES: libcpp-hardening-mode=none
1313

14-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
15-
16-
#include <__assert>
14+
#include <__cxx03/__assert>
1715
#include <cassert>
1816

1917
bool executed_condition = false;

libcxx/test/libcxx-03/assertions/single_expression.pass.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
// This is useful so we can use them in places that require an expression, such as
1111
// in a constructor initializer list.
1212

13-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
14-
15-
#include <__assert>
13+
#include <__cxx03/__assert>
1614
#include <cassert>
1715

1816
void f() {

libcxx/test/libcxx-03/containers/associative/tree_balance_after_insert.pass.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
// void
1414
// __tree_balance_after_insert(_NodePtr __root, _NodePtr __x)
1515

16-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
17-
18-
#include <__tree>
16+
#include <__cxx03/__tree>
1917
#include <cassert>
2018

2119
#include "test_macros.h"

libcxx/test/libcxx-03/containers/associative/tree_key_value_traits.pass.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
10-
11-
#include <__tree>
9+
#include <__cxx03/__tree>
1210
#include <map>
1311
#include <set>
1412
#include <type_traits>

libcxx/test/libcxx-03/containers/associative/tree_left_rotate.pass.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
// void
1414
// __tree_left_rotate(_NodePtr __x);
1515

16-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
17-
18-
#include <__tree>
16+
#include <__cxx03/__tree>
1917
#include <cassert>
2018

2119
#include "test_macros.h"

libcxx/test/libcxx-03/containers/associative/tree_remove.pass.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
// void
1414
// __tree_remove(_NodePtr __root, _NodePtr __z)
1515

16-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
17-
18-
#include <__tree>
16+
#include <__cxx03/__tree>
1917
#include <cassert>
2018

2119
#include "test_macros.h"

libcxx/test/libcxx-03/containers/associative/tree_right_rotate.pass.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
// void
1414
// __tree_right_rotate(_NodePtr __x);
1515

16-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
17-
18-
#include <__tree>
16+
#include <__cxx03/__tree>
1917
#include <cassert>
2018

2119
#include "test_macros.h"

0 commit comments

Comments
 (0)