llvm-project/libcxx/test/selftest/test_macros.pass.cpp
Nikolas Klauser b173c12b54
[libc++] Make libcxx/selftest a top-level test directory (#144852)
These tests aren't actually libc++-specific for the most part. They test
the testsuite, so they aren't tied to any implementation. That means
anybody using the testsuite should be able to run these tests
successfully.

The most notable changes are that
- `test/libcxx/selftest/modules` moved to `test/libcxx/modules`, since
the assumptions these tests check are libc++-specific
- there is a new `lit.local.cfg` for `test/selftest`
- `selftest/dsl/dsl.sh.py` was modified since the path to the monorepo
root changed
2025-07-02 21:47:26 +02:00

42 lines
875 B
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
//
//===----------------------------------------------------------------------===//
//
// Test the "test_macros.h" header.
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
#include <__config>
#include "test_macros.h"
#ifndef TEST_STD_VER
#error TEST_STD_VER must be defined
#endif
#ifndef TEST_NOEXCEPT
#error TEST_NOEXCEPT must be defined
#endif
#ifndef LIBCPP_ASSERT
#error LIBCPP_ASSERT must be defined
#endif
#ifndef LIBCPP_STATIC_ASSERT
#error LIBCPP_STATIC_ASSERT must be defined
#endif
void test_noexcept() TEST_NOEXCEPT
{
}
int main(int, char**)
{
test_noexcept();
return 0;
}