@@ -64,6 +64,24 @@ template <class CharT>
64
64
static void test_c () {
65
65
using namespace std ::literals::chrono_literals;
66
66
67
+ assert (stream_c_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{-946'688'523'123'456' 789ns}) ==
68
+ SV (" 1940-01-01 22:57:56.876543211" ));
69
+
70
+ assert (stream_c_locale<CharT>(std::chrono::local_time<std::chrono::microseconds>{-946'688'523'123' 456us}) ==
71
+ SV (" 1940-01-01 22:57:56.876544" ));
72
+
73
+ assert (stream_c_locale<CharT>(std::chrono::local_time<std::chrono::milliseconds>{-946'688'523' 123ms}) ==
74
+ SV (" 1940-01-01 22:57:56.877" ));
75
+
76
+ assert (stream_c_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{-1ns}) ==
77
+ SV (" 1969-12-31 23:59:59.999999999" ));
78
+
79
+ assert (stream_c_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{0ns}) ==
80
+ SV (" 1970-01-01 00:00:00.000000000" ));
81
+
82
+ assert (stream_c_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{1ns}) ==
83
+ SV (" 1970-01-01 00:00:00.000000001" ));
84
+
67
85
assert (stream_c_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{946'688'523'123'456' 789ns}) ==
68
86
SV (" 2000-01-01 01:02:03.123456789" ));
69
87
assert (stream_c_locale<CharT>(std::chrono::local_time<std::chrono::microseconds>{946'688'523'123' 456us}) ==
@@ -97,6 +115,24 @@ template <class CharT>
97
115
static void test_fr_FR () {
98
116
using namespace std ::literals::chrono_literals;
99
117
118
+ assert (stream_fr_FR_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{-946'688'523'123'456' 789ns}) ==
119
+ SV (" 1940-01-01 22:57:56,876543211" ));
120
+
121
+ assert (stream_fr_FR_locale<CharT>(std::chrono::local_time<std::chrono::microseconds>{-946'688'523'123' 456us}) ==
122
+ SV (" 1940-01-01 22:57:56,876544" ));
123
+
124
+ assert (stream_fr_FR_locale<CharT>(std::chrono::local_time<std::chrono::milliseconds>{-946'688'523' 123ms}) ==
125
+ SV (" 1940-01-01 22:57:56,877" ));
126
+
127
+ assert (stream_fr_FR_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{-1ns}) ==
128
+ SV (" 1969-12-31 23:59:59,999999999" ));
129
+
130
+ assert (stream_fr_FR_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{0ns}) ==
131
+ SV (" 1970-01-01 00:00:00,000000000" ));
132
+
133
+ assert (stream_fr_FR_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{1ns}) ==
134
+ SV (" 1970-01-01 00:00:00,000000001" ));
135
+
100
136
assert (stream_fr_FR_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{946'688'523'123'456' 789ns}) ==
101
137
SV (" 2000-01-01 01:02:03,123456789" ));
102
138
assert (stream_fr_FR_locale<CharT>(std::chrono::local_time<std::chrono::microseconds>{946'688'523'123' 456us}) ==
@@ -131,6 +167,24 @@ template <class CharT>
131
167
static void test_ja_JP () {
132
168
using namespace std ::literals::chrono_literals;
133
169
170
+ assert (stream_ja_JP_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{-946'688'523'123'456' 789ns}) ==
171
+ SV (" 1940-01-01 22:57:56.876543211" ));
172
+
173
+ assert (stream_ja_JP_locale<CharT>(std::chrono::local_time<std::chrono::microseconds>{-946'688'523'123' 456us}) ==
174
+ SV (" 1940-01-01 22:57:56.876544" ));
175
+
176
+ assert (stream_ja_JP_locale<CharT>(std::chrono::local_time<std::chrono::milliseconds>{-946'688'523' 123ms}) ==
177
+ SV (" 1940-01-01 22:57:56.877" ));
178
+
179
+ assert (stream_ja_JP_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{-1ns}) ==
180
+ SV (" 1969-12-31 23:59:59.999999999" ));
181
+
182
+ assert (stream_ja_JP_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{0ns}) ==
183
+ SV (" 1970-01-01 00:00:00.000000000" ));
184
+
185
+ assert (stream_ja_JP_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{1ns}) ==
186
+ SV (" 1970-01-01 00:00:00.000000001" ));
187
+
134
188
assert (stream_ja_JP_locale<CharT>(std::chrono::local_time<std::chrono::nanoseconds>{946'688'523'123'456' 789ns}) ==
135
189
SV (" 2000-01-01 01:02:03.123456789" ));
136
190
assert (stream_ja_JP_locale<CharT>(std::chrono::local_time<std::chrono::microseconds>{946'688'523'123' 456us}) ==
0 commit comments