5
5
//
6
6
// ===----------------------------------------------------------------------===//
7
7
8
- // XFAIL: LIBCXX-FREEBSD-FIXME
9
-
10
8
// UNSUPPORTED: c++03, c++11, c++14, c++17
11
9
// UNSUPPORTED: no-localization
12
10
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
@@ -247,7 +245,7 @@ static void test_valid_positive_integral_values() {
247
245
" %r='00:00:00'\t "
248
246
#elif defined(_AIX)
249
247
" %r='12:00:00 AM'\t "
250
- #elif defined(__APPLE__)
248
+ #elif defined(__APPLE__) || defined(__FreeBSD__)
251
249
" %r=''\t "
252
250
#else
253
251
" %r='12:00:00 '\t "
@@ -280,7 +278,7 @@ static void test_valid_positive_integral_values() {
280
278
" %r='11:59:59'\t "
281
279
#elif defined(_AIX)
282
280
" %r='11:59:59 AM'\t "
283
- #elif defined(__APPLE__)
281
+ #elif defined(__APPLE__) || defined(__FreeBSD__)
284
282
" %r=''\t "
285
283
#else
286
284
" %r='11:59:59 '\t "
@@ -313,7 +311,7 @@ static void test_valid_positive_integral_values() {
313
311
" %r='12:00:00'\t "
314
312
#elif defined(_AIX)
315
313
" %r='12:00:00 PM'\t "
316
- #elif defined(__APPLE__)
314
+ #elif defined(__APPLE__) || defined(__FreeBSD__)
317
315
" %r=''\t "
318
316
#else
319
317
" %r='12:00:00 '\t "
@@ -344,7 +342,7 @@ static void test_valid_positive_integral_values() {
344
342
" %T='23:59:59'\t "
345
343
#if defined(_AIX)
346
344
" %r='11:59:59 PM'\t "
347
- #elif defined(__APPLE__)
345
+ #elif defined(__APPLE__) || defined(__FreeBSD__)
348
346
" %r=''\t "
349
347
#elif defined(_WIN32)
350
348
" %r='23:59:59'\t "
@@ -379,7 +377,7 @@ static void test_valid_positive_integral_values() {
379
377
" %r='00:00:00'\t "
380
378
#elif defined(_AIX)
381
379
" %r='12:00:00 AM'\t "
382
- #elif defined(__APPLE__)
380
+ #elif defined(__APPLE__) || defined(__FreeBSD__)
383
381
" %r=''\t "
384
382
#elif defined(_WIN32)
385
383
" %r='12:00:00'\t "
@@ -396,7 +394,7 @@ static void test_valid_positive_integral_values() {
396
394
std::chrono::duration<int , std::ratio<86400 >>(7 ));
397
395
398
396
// Use supplied locale (ja_JP). This locale has a different alternate.
399
- #if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
397
+ #if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
400
398
check (loc,
401
399
SV (" %H='00'\t "
402
400
" %OH='00'\t "
@@ -413,8 +411,12 @@ static void test_valid_positive_integral_values() {
413
411
# endif
414
412
" %R='00:00'\t "
415
413
" %T='00:00:00'\t "
416
- # if defined(__APPLE__)
414
+ # if defined(__APPLE__) || defined(__FreeBSD__)
415
+ # if defined(__APPLE__)
417
416
" %r='12:00:00 AM'\t "
417
+ # else
418
+ " %r='12:00:00 午前'\t "
419
+ # endif
418
420
" %X='00時00分00秒'\t "
419
421
" %EX='00時00分00秒'\t "
420
422
# elif defined(_WIN32)
@@ -449,8 +451,12 @@ static void test_valid_positive_integral_values() {
449
451
# endif
450
452
" %R='11:59'\t "
451
453
" %T='11:59:59'\t "
452
- # if defined(__APPLE__)
454
+ # if defined(__APPLE__) || defined(__FreeBSD__)
455
+ # if defined(__APPLE__)
453
456
" %r='11:59:59 AM'\t "
457
+ # else
458
+ " %r='11:59:59 午前'\t "
459
+ # endif
454
460
" %X='11時59分59秒'\t "
455
461
" %EX='11時59分59秒'\t "
456
462
# elif defined(_WIN32)
@@ -485,8 +491,12 @@ static void test_valid_positive_integral_values() {
485
491
# endif
486
492
" %R='12:00'\t "
487
493
" %T='12:00:00'\t "
488
- # if defined(__APPLE__)
494
+ # if defined(__APPLE__) || defined(__FreeBSD__)
495
+ # if defined(__APPLE__)
489
496
" %r='12:00:00 PM'\t "
497
+ # else
498
+ " %r='12:00:00 午後'\t "
499
+ # endif
490
500
" %X='12時00分00秒'\t "
491
501
" %EX='12時00分00秒'\t "
492
502
# else
@@ -521,8 +531,12 @@ static void test_valid_positive_integral_values() {
521
531
# endif
522
532
" %R='23:59'\t "
523
533
" %T='23:59:59'\t "
524
- # if defined(__APPLE__)
534
+ # if defined(__APPLE__) || defined(__FreeBSD__)
535
+ # if defined(__APPLE__)
525
536
" %r='11:59:59 PM'\t "
537
+ # else
538
+ " %r='11:59:59 午後'\t "
539
+ # endif
526
540
" %X='23時59分59秒'\t "
527
541
" %EX='23時59分59秒'\t "
528
542
# else
@@ -557,8 +571,12 @@ static void test_valid_positive_integral_values() {
557
571
# endif
558
572
" %R='00:00'\t "
559
573
" %T='00:00:00'\t "
560
- # if defined(__APPLE__)
574
+ # if defined(__APPLE__) || defined(__FreeBSD__)
575
+ # if defined(__APPLE__)
561
576
" %r='12:00:00 AM'\t "
577
+ # else
578
+ " %r='12:00:00 午前'\t "
579
+ # endif
562
580
" %X='00時00分00秒'\t "
563
581
" %EX='00時00分00秒'\t "
564
582
# elif defined(_WIN32)
@@ -786,7 +804,7 @@ static void test_valid_negative_integral_values() {
786
804
" %T='23:59:59'\t "
787
805
#if defined(_AIX)
788
806
" %r='11:59:59 PM'\t "
789
- #elif defined(__APPLE__)
807
+ #elif defined(__APPLE__) || defined(__FreeBSD__)
790
808
" %r=''\t "
791
809
#elif defined(_WIN32)
792
810
" %r='23:59:59'\t "
@@ -803,7 +821,7 @@ static void test_valid_negative_integral_values() {
803
821
-(23h + 59min + 59s));
804
822
805
823
// Use supplied locale (ja_JP). This locale has a different alternate.
806
- #if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
824
+ #if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
807
825
check (loc,
808
826
SV (" -%H='23'\t "
809
827
" %OH='23'\t "
@@ -820,8 +838,12 @@ static void test_valid_negative_integral_values() {
820
838
# endif
821
839
" %R='23:59'\t "
822
840
" %T='23:59:59'\t "
823
- # if defined(__APPLE__)
841
+ # if defined(__APPLE__) || defined(__FreeBSD__)
842
+ # if defined(__APPLE__)
824
843
" %r='11:59:59 PM'\t "
844
+ # else
845
+ " %r='11:59:59 午後'\t "
846
+ # endif
825
847
" %X='23時59分59秒'\t "
826
848
" %EX='23時59分59秒'\t "
827
849
# elif defined(_WIN32)
@@ -839,7 +861,7 @@ static void test_valid_negative_integral_values() {
839
861
" \n " ),
840
862
lfmt,
841
863
-(23h + 59min + 59s));
842
- #else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
864
+ #else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)|| defined(__FreeBSD__)
843
865
check (loc,
844
866
SV (" -%H='23'\t "
845
867
" %OH='二十三'\t "
@@ -861,7 +883,7 @@ static void test_valid_negative_integral_values() {
861
883
" \n " ),
862
884
lfmt,
863
885
-(23h + 59min + 59s));
864
- #endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
886
+ #endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)|| defined(__FreeBSD__)
865
887
std::locale::global (std::locale::classic ());
866
888
}
867
889
@@ -1014,7 +1036,8 @@ static void test_valid_fractional_values() {
1014
1036
check (loc, SV (" 00.011" ), SV (" {:L%S}" ), std::chrono::duration<double , std::milli>(11.123456789 ));
1015
1037
check (loc, SV (" 01" ), SV (" {:L%S}" ), std::chrono::duration<long double >(61.123456789 ));
1016
1038
1017
- #if defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
1039
+ #if defined(__APPLE__) || defined(_AIX) || defined(_WIN32) || defined(__FreeBSD__)
1040
+
1018
1041
check (SV (" 00.000000001" ), SV (" {:%OS}" ), 1ns);
1019
1042
check (SV (" 00.000000501" ), SV (" {:%OS}" ), 501ns);
1020
1043
check (SV (" 00.000001000" ), SV (" {:%OS}" ), 1000ns);
@@ -1030,7 +1053,8 @@ static void test_valid_fractional_values() {
1030
1053
check (SV (" 00.001" ), SV (" {:%OS}" ), std::chrono::duration<float , std::milli>(1.123456789 ));
1031
1054
check (SV (" 00.011" ), SV (" {:%OS}" ), std::chrono::duration<double , std::milli>(11.123456789 ));
1032
1055
check (SV (" 01" ), SV (" {:%OS}" ), std::chrono::duration<long double >(61.123456789 ));
1033
- #else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
1056
+ #else // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)|| defined(__FreeBSD__)
1057
+
1034
1058
check (loc, SV (" 〇.000000001" ), SV (" {:L%OS}" ), 1ns);
1035
1059
check (loc, SV (" 〇.000000501" ), SV (" {:L%OS}" ), 501ns);
1036
1060
check (loc, SV (" 〇.000001000" ), SV (" {:L%OS}" ), 1000ns);
@@ -1046,7 +1070,7 @@ static void test_valid_fractional_values() {
1046
1070
check (loc, SV (" 〇.001" ), SV (" {:L%OS}" ), std::chrono::duration<float , std::milli>(1.123456789 ));
1047
1071
check (loc, SV (" 〇.011" ), SV (" {:L%OS}" ), std::chrono::duration<double , std::milli>(11.123456789 ));
1048
1072
check (loc, SV (" 一" ), SV (" {:L%OS}" ), std::chrono::duration<long double >(61.123456789 ));
1049
- #endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)
1073
+ #endif // defined(__APPLE__) || defined(_AIX) || defined(_WIN32)|| defined(__FreeBSD__)
1050
1074
1051
1075
check (loc, SV (" 01:05:06.000000001" ), SV (" {:L%T}" ), 1h + 5min + 6s + 1ns);
1052
1076
check (loc, SV (" 01:05:06.000000501" ), SV (" {:L%T}" ), 1h + 5min + 6s + 501ns);
0 commit comments