[libcxx-commits] [PATCH] D114243: [libc++] Remove obsolete feature test macro tests

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 19 06:55:03 PST 2021


ldionne created this revision.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

There was a brief time back in the days when we wrote feature test macro
tests manually. In particular, we had test files for __cpp_lib_to_chars
and __cpp_lib_memory_resource, which we don't implement (those were empty).

Since we now have a principled way of generating these tests with scripts,
this commit removes the obsolete (and empty) tests for these two feature
test macros.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114243

Files:
  libcxx/test/std/language.support/support.limits/support.limits.general/charconv.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp


Index: libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp
===================================================================
--- libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-//
-// <memory_resource> feature macros
-
-/*  Constant                                    Value
-    __cpp_lib_memory_resource                   201603L
-
-*/
-
-// XFAIL
-// #include <memory_resource>
-#include <cassert>
-#include "test_macros.h"
-
-int main(int, char**)
-{
-//  ensure that the macros that are supposed to be defined in <memory_resource> are defined.
-
-/*
-#if !defined(__cpp_lib_fooby)
-# error "__cpp_lib_fooby is not defined"
-#elif __cpp_lib_fooby < 201606L
-# error "__cpp_lib_fooby has an invalid value"
-#endif
-*/
-
-  return 0;
-}
Index: libcxx/test/std/language.support/support.limits/support.limits.general/charconv.pass.cpp
===================================================================
--- libcxx/test/std/language.support/support.limits/support.limits.general/charconv.pass.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-//
-// <charconv> feature macros
-
-/*  Constant                                    Value
-    __cpp_lib_to_chars                          201611L
-
-*/
-
-#include <charconv>
-#include <cassert>
-#include "test_macros.h"
-
-int main(int, char**)
-{
-//  ensure that the macros that are supposed to be defined in <utility> are defined.
-
-/*
-#if !defined(__cpp_lib_fooby)
-# error "__cpp_lib_fooby is not defined"
-#elif __cpp_lib_fooby < 201606L
-# error "__cpp_lib_fooby has an invalid value"
-#endif
-*/
-
-  return 0;
-}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114243.388492.patch
Type: text/x-patch
Size: 2449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211119/b01c0558/attachment.bin>


More information about the libcxx-commits mailing list