[libcxx-commits] [PATCH] D140650: [NFC][libc++][test] Improves code reuse.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 10 09:50:04 PST 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbc21af6a43db: [NFC][libc++][test] Improves code reuse. (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140650/new/

https://reviews.llvm.org/D140650

Files:
  libcxx/test/std/utilities/format/format.tuple/format.functions.tests.h
  libcxx/test/support/format.functions.common.h


Index: libcxx/test/support/format.functions.common.h
===================================================================
--- libcxx/test/support/format.functions.common.h
+++ libcxx/test/support/format.functions.common.h
@@ -10,6 +10,8 @@
 
 // Contains the common part of the formatter tests for different papers.
 
+#include <algorithm>
+#include <charconv>
 #include <format>
 
 #include "make_string.h"
Index: libcxx/test/std/utilities/format/format.tuple/format.functions.tests.h
===================================================================
--- libcxx/test/std/utilities/format/format.tuple/format.functions.tests.h
+++ libcxx/test/std/utilities/format/format.tuple/format.functions.tests.h
@@ -11,28 +11,7 @@
 #include <concepts>
 #include <format>
 
-#include "make_string.h"
-
-#define STR(S) MAKE_STRING(CharT, S)
-#define SV(S) MAKE_STRING_VIEW(CharT, S)
-
-template <class T>
-struct context {};
-
-template <>
-struct context<char> {
-  using type = std::format_context;
-};
-
-#ifndef TEST_HAS_NO_WIDE_CHARACTERS
-template <>
-struct context<wchar_t> {
-  using type = std::wformat_context;
-};
-#endif
-
-template <class T>
-using context_t = typename context<T>::type;
+#include "format.functions.common.h"
 
 enum class color { black, red, gold };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140650.487855.patch
Type: text/x-patch
Size: 1273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230110/6d7c151f/attachment.bin>


More information about the libcxx-commits mailing list