@@ -71,8 +71,45 @@ template <class CharT>
71
71
static void test_c () {
72
72
using namespace std ::literals::chrono_literals;
73
73
74
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{-946'688'523'123'456' 789ns}) ==
75
+ SV (" 1940-01-01 22:57:56.876543211" ));
76
+
77
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::microseconds>{-946'688'523'123' 456us}) ==
78
+ SV (" 1940-01-01 22:57:56.876544" ));
79
+
80
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::milliseconds>{-946'688'523' 123ms}) ==
81
+ SV (" 1940-01-01 22:57:56.877" ));
82
+
83
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{-1000000000ns}) ==
84
+ SV (" 1969-12-31 23:59:59.000000000" ));
85
+
86
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::microseconds>{-1000000us}) ==
87
+ SV (" 1969-12-31 23:59:59.000000" ));
88
+
89
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::milliseconds>{-1000ms}) ==
90
+ SV (" 1969-12-31 23:59:59.000" ));
91
+
92
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{-1ns}) ==
93
+ SV (" 1969-12-31 23:59:59.999999999" ));
94
+
95
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{0ns}) ==
96
+ SV (" 1970-01-01 00:00:00.000000000" ));
97
+
98
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{1ns}) ==
99
+ SV (" 1970-01-01 00:00:00.000000001" ));
100
+
101
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{1000000000ns}) ==
102
+ SV (" 1970-01-01 00:00:01.000000000" ));
103
+
104
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::microseconds>{1000000us}) ==
105
+ SV (" 1970-01-01 00:00:01.000000" ));
106
+
107
+ assert (stream_c_locale<CharT>(std::chrono::file_time<std::chrono::milliseconds>{1000ms}) ==
108
+ SV (" 1970-01-01 00:00:01.000" ));
109
+
74
110
assert (stream_c_locale<CharT>(file_time<std::chrono::nanoseconds>{946'688'523'123'456' 789ns}) ==
75
111
SV (" 2000-01-01 01:02:03.123456789" ));
112
+
76
113
assert (stream_c_locale<CharT>(file_time<std::chrono::microseconds>{946'688'523'123' 456us}) ==
77
114
SV (" 2000-01-01 01:02:03.123456" ));
78
115
@@ -107,6 +144,42 @@ template <class CharT>
107
144
static void test_fr_FR () {
108
145
using namespace std ::literals::chrono_literals;
109
146
147
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{-946'688'523'123'456' 789ns}) ==
148
+ SV (" 1940-01-01 22:57:56,876543211" ));
149
+
150
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::microseconds>{-946'688'523'123' 456us}) ==
151
+ SV (" 1940-01-01 22:57:56,876544" ));
152
+
153
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::milliseconds>{-946'688'523' 123ms}) ==
154
+ SV (" 1940-01-01 22:57:56,877" ));
155
+
156
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{-1000000000ns}) ==
157
+ SV (" 1969-12-31 23:59:59,000000000" ));
158
+
159
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::microseconds>{-1000000us}) ==
160
+ SV (" 1969-12-31 23:59:59,000000" ));
161
+
162
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::milliseconds>{-1000ms}) ==
163
+ SV (" 1969-12-31 23:59:59,000" ));
164
+
165
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{-1ns}) ==
166
+ SV (" 1969-12-31 23:59:59,999999999" ));
167
+
168
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{0ns}) ==
169
+ SV (" 1970-01-01 00:00:00,000000000" ));
170
+
171
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{1ns}) ==
172
+ SV (" 1970-01-01 00:00:00,000000001" ));
173
+
174
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{1000000000ns}) ==
175
+ SV (" 1970-01-01 00:00:01,000000000" ));
176
+
177
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::microseconds>{1000000us}) ==
178
+ SV (" 1970-01-01 00:00:01,000000" ));
179
+
180
+ assert (stream_fr_FR_locale<CharT>(std::chrono::file_time<std::chrono::milliseconds>{1000ms}) ==
181
+ SV (" 1970-01-01 00:00:01,000" ));
182
+
110
183
assert (stream_fr_FR_locale<CharT>(file_time<std::chrono::nanoseconds>{946'688'523'123'456' 789ns}) ==
111
184
SV (" 2000-01-01 01:02:03,123456789" ));
112
185
assert (stream_fr_FR_locale<CharT>(file_time<std::chrono::microseconds>{946'688'523'123' 456us}) ==
@@ -144,6 +217,42 @@ template <class CharT>
144
217
static void test_ja_JP () {
145
218
using namespace std ::literals::chrono_literals;
146
219
220
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{-946'688'523'123'456' 789ns}) ==
221
+ SV (" 1940-01-01 22:57:56.876543211" ));
222
+
223
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::microseconds>{-946'688'523'123' 456us}) ==
224
+ SV (" 1940-01-01 22:57:56.876544" ));
225
+
226
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::milliseconds>{-946'688'523' 123ms}) ==
227
+ SV (" 1940-01-01 22:57:56.877" ));
228
+
229
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{-1000000000ns}) ==
230
+ SV (" 1969-12-31 23:59:59.000000000" ));
231
+
232
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::microseconds>{-1000000us}) ==
233
+ SV (" 1969-12-31 23:59:59.000000" ));
234
+
235
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::milliseconds>{-1000ms}) ==
236
+ SV (" 1969-12-31 23:59:59.000" ));
237
+
238
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{-1ns}) ==
239
+ SV (" 1969-12-31 23:59:59.999999999" ));
240
+
241
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{0ns}) ==
242
+ SV (" 1970-01-01 00:00:00.000000000" ));
243
+
244
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{1ns}) ==
245
+ SV (" 1970-01-01 00:00:00.000000001" ));
246
+
247
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::nanoseconds>{1000000000ns}) ==
248
+ SV (" 1970-01-01 00:00:01.000000000" ));
249
+
250
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::microseconds>{1000000us}) ==
251
+ SV (" 1970-01-01 00:00:01.000000" ));
252
+
253
+ assert (stream_ja_JP_locale<CharT>(std::chrono::file_time<std::chrono::milliseconds>{1000ms}) ==
254
+ SV (" 1970-01-01 00:00:01.000" ));
255
+
147
256
assert (stream_ja_JP_locale<CharT>(file_time<std::chrono::nanoseconds>{946'688'523'123'456' 789ns}) ==
148
257
SV (" 2000-01-01 01:02:03.123456789" ));
149
258
assert (stream_ja_JP_locale<CharT>(file_time<std::chrono::microseconds>{946'688'523'123' 456us}) ==
0 commit comments