[libc++] Move a few tests into more correct places (#147557)

This commit is contained in:
Nikolas Klauser 2025-07-10 20:55:07 +02:00 committed by GitHub
parent 9320d1d484
commit 03f6f48b73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 15 additions and 6 deletions

View file

@ -11,6 +11,7 @@
// appear to provide that behavior too.
#include <cstddef>
#include "test_macros.h"
using PtrdiffT = ::ptrdiff_t;

View file

@ -0,0 +1,4 @@
# Only libc++ supports clang-specific extensions
if "stdlib=libc++" not in config.available_features:
config.unsupported = True

View file

@ -6,7 +6,7 @@
#
# ===----------------------------------------------------------------------===##
# Test that all headers define the _LIBCPP_VERSION macro.
# Test that all public headers define the _LIBCPP_VERSION macro.
# RUN: %{python} %s %{libcxx-dir}/utils

View file

@ -0,0 +1,3 @@
if "stdlib=libc++" not in config.available_features:
config.unsupported = True

View file

@ -1,5 +0,0 @@
# The tests in this directory need to run Python
import shlex
import sys
config.substitutions.append(("%{python}", shlex.quote(sys.executable)))

View file

@ -28,6 +28,9 @@ for header in public_headers:
{lit_header_restrictions.get(header, '')}
{lit_header_undeprecations.get(header, '')}
// We're using compiler-specific flags in this test
// REQUIRES: (gcc || clang)
// RUN: %{{cxx}} -c %s -o %t.first.o %{{flags}} %{{compile_flags}}
// RUN: %{{cxx}} -c %s -o %t.second.o -DWITH_MAIN %{{flags}} %{{compile_flags}}
// RUN: %{{cxx}} -o %t.exe %t.first.o %t.second.o %{{flags}} %{{link_flags}}

View file

@ -48,6 +48,9 @@ for header in public_headers:
//--- {header}.compile.pass.cpp
// UNSUPPORTED: FROZEN-CXX03-HEADERS-FIXME
// TODO: This is currently a libc++-specific way of testing the includes, but is a requirement for all implementation
// REQUIRES: stdlib=libc++
{lit_header_restrictions.get(header, '')}
{lit_header_undeprecations.get(header, '')}