[libcxx-commits] [PATCH] D109298: [libc++][NFC] Make tuple dtor test compile test

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Sep 5 16:12:45 PDT 2021


jloser created this revision.
jloser added reviewers: Mordante, cjdb.
jloser requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

`dtor.pass.cpp` means this file is compiled, linked, and executed but
all of its code is compile-time only. So, rename the file to
`dtor.compile.pass.cpp` so it only verifies that it compiles
successfully.

Clean up unused includes in the test file as well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109298

Files:
  libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.compile.pass.cpp
  libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp


Index: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.compile.pass.cpp
===================================================================
--- libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.compile.pass.cpp
+++ libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.compile.pass.cpp
@@ -20,12 +20,9 @@
 
 #include <tuple>
 #include <string>
-#include <cassert>
 #include <type_traits>
 
-#include "test_macros.h"
-
-int main(int, char**)
+void test()
 {
   static_assert(std::is_trivially_destructible<
       std::tuple<> >::value, "");
@@ -37,6 +34,4 @@
       std::tuple<std::string> >::value, "");
   static_assert(!std::is_trivially_destructible<
       std::tuple<int, std::string> >::value, "");
-
-  return 0;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109298.370832.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210905/63b1ac8f/attachment.bin>


More information about the libcxx-commits mailing list