@@ -135,19 +135,13 @@ TEST_CASE("format multiple mixed arguments", "[ct_format]") {
135135 stdx::make_tuple (42 , " B" sv)});
136136}
137137
138- TEST_CASE (" format a formatted string " , " [ct_format]" ) {
138+ TEST_CASE (" format a format result " , " [ct_format]" ) {
139139 static_assert (stdx::ct_format<" The value is {}." >(
140- CX_VALUE ( stdx::ct_format<" (year={})" >(2022 ) )) ==
140+ stdx::ct_format<" (year={})" >(2022 )) ==
141141 stdx::format_result{" The value is (year={})." _ctst,
142142 stdx::make_tuple (2022 )});
143143}
144144
145- TEST_CASE (" format a ct-formatted string" , " [ct_format]" ) {
146- constexpr static auto cts = stdx::ct_format<" (year={})" >(CX_VALUE (2024 ));
147- static_assert (stdx::ct_format<" The value is {}." >(CX_VALUE (cts)) ==
148- " The value is (year=2024)." _fmt_res);
149- }
150-
151145namespace {
152146template <typename T, T...> struct string_constant {
153147 private:
@@ -182,23 +176,14 @@ TEST_CASE("format a string-type argument", "[ct_format]") {
182176 " Hello A!" _fmt_res);
183177}
184178
185- TEST_CASE (" format a formatted string with different type" , " [ct_format]" ) {
186- static_assert (stdx::ct_format<" A{}D" , string_constant>(CX_VALUE (
187- stdx::ct_format<" B{}C" , string_constant>(2022 ))) ==
179+ TEST_CASE (" format a format result with different type" , " [ct_format]" ) {
180+ static_assert (stdx::ct_format<" A{}D" , string_constant>(
181+ stdx::ct_format<" B{}C" , string_constant>(2022 )) ==
188182 stdx::format_result{
189183 string_constant<char , ' A' , ' B' , ' {' , ' }' , ' C' , ' D' >{},
190184 stdx::make_tuple (2022 )});
191185}
192186
193- TEST_CASE (" format a ct-formatted string with different type" , " [ct_format]" ) {
194- constexpr static auto cts =
195- stdx::ct_format<" B{}C" , string_constant>(CX_VALUE (2024 ));
196- static_assert (
197- stdx::ct_format<" A{}D" , string_constant>(CX_VALUE (cts)) ==
198- stdx::format_result{
199- string_constant<char , ' A' , ' B' , ' 2' , ' 0' , ' 2' , ' 4' , ' C' , ' D' >{}});
200- }
201-
202187TEST_CASE (" format multiple mixed arguments with different type" ,
203188 " [ct_format]" ) {
204189 using namespace std ::string_view_literals;
0 commit comments