@@ -46,6 +46,7 @@ using fmt::wmemory_buffer;
46
46
using fmt::wstring_view;
47
47
using fmt::detail::max_value;
48
48
49
+ using testing::Contains;
49
50
using testing::Return;
50
51
using testing::StrictMock;
51
52
@@ -224,7 +225,8 @@ TEST(BufferAppenderTest, BufferAppenderDefaultConstruct) {
224
225
static_assert (
225
226
std::is_default_constructible<
226
227
std::back_insert_iterator<fmt::detail::buffer<char >>>::value ==
227
- std::is_default_constructible<fmt::detail::buffer_appender<char >>::value,
228
+ std::is_default_constructible<
229
+ fmt::detail::buffer_appender<char >>::value,
228
230
" " );
229
231
}
230
232
@@ -994,7 +996,8 @@ TEST(FormatterTest, Precision) {
994
996
" 012970999954193198940908041656332452475714786901472678015935523861155013"
995
997
" 480352649347201937902681071074917033322268447533357208324319361e-324" ,
996
998
format (" {:.494}" , 4.9406564584124654E-324 ));
997
- EXPECT_EQ (
999
+
1000
+ std::string outputs[] = {
998
1001
" -0X1.41FE3FFE71C9E000000000000000000000000000000000000000000000000000000"
999
1002
" 000000000000000000000000000000000000000000000000000000000000000000000000"
1000
1003
" 000000000000000000000000000000000000000000000000000000000000000000000000"
@@ -1007,7 +1010,20 @@ TEST(FormatterTest, Precision) {
1007
1010
" 000000000000000000000000000000000000000000000000000000000000000000000000"
1008
1011
" 000000000000000000000000000000000000000000000000000000000000000000000000"
1009
1012
" 000000000000000000000000000000000000000000000000000P+127" ,
1010
- format (" {:.838A}" , -2.14001164E+38 ));
1013
+ " -0XA.0FF1FFF38E4F0000000000000000000000000000000000000000000000000000000"
1014
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1015
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1016
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1017
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1018
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1019
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1020
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1021
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1022
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1023
+ " 000000000000000000000000000000000000000000000000000000000000000000000000"
1024
+ " 000000000000000000000000000000000000000000000000000P+124" };
1025
+ EXPECT_THAT (outputs, Contains (format (" {:.838A}" , -2.14001164E+38 )));
1026
+
1011
1027
EXPECT_EQ (" 123." , format (" {:#.0f}" , 123.0 ));
1012
1028
EXPECT_EQ (" 1.23" , format (" {:.02f}" , 1.234 ));
1013
1029
EXPECT_EQ (" 0.001" , format (" {:.1g}" , 0.001 ));
0 commit comments