1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 /******************************************************************** 4 * COPYRIGHT: 5 * Copyright (c) 1997-2007, International Business Machines Corporation and 6 * others. All Rights Reserved. 7 ********************************************************************/ 8 9 #ifndef __IntlCalendarTest__ 10 #define __IntlCalendarTest__ 11 12 #include "unicode/utypes.h" 13 14 #if !UCONFIG_NO_FORMATTING 15 16 #include "unicode/calendar.h" 17 #include "unicode/smpdtfmt.h" 18 #include "caltztst.h" 19 20 class IntlCalendarTest: public CalendarTimeZoneTest { 21 public: 22 // IntlTest override 23 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override; 24 public: 25 void TestTypes(); 26 27 void TestGregorian(); 28 29 void TestBuddhist(); 30 void TestBuddhistFormat(); 31 void TestBug21043Indian(); 32 void TestBug21044Hebrew(); 33 void TestBug21045Islamic(); 34 void TestBug21046IslamicUmalqura(); 35 36 void TestTaiwan(); 37 38 void TestJapanese(); 39 void TestJapaneseFormat(); 40 void TestJapanese3860(); 41 void TestForceGannenNumbering(); 42 43 void TestPersian(); 44 void TestPersianFormat(); 45 46 void TestConsistencyGregorian(); 47 void TestConsistencyCoptic(); 48 void TestConsistencyEthiopic(); 49 void TestConsistencyROC(); 50 void TestConsistencyChinese(); 51 void TestConsistencyDangi(); 52 void TestConsistencyBuddhist(); 53 void TestConsistencyEthiopicAmeteAlem(); 54 void TestConsistencyHebrew(); 55 void TestConsistencyIndian(); 56 void TestConsistencyIslamic(); 57 void TestConsistencyIslamicCivil(); 58 void TestConsistencyIslamicRGSA(); 59 void TestConsistencyIslamicTBLA(); 60 void TestConsistencyIslamicUmalqura(); 61 void TestConsistencyPersian(); 62 void TestConsistencyJapanese(); 63 void TestIslamicUmalquraCalendarSlow(); 64 void TestJapaneseLargeEra(); 65 66 protected: 67 // Test a Gregorian-Like calendar 68 void quasiGregorianTest(Calendar& cal, const Locale& gregoLocale, const int32_t *data); 69 void simpleTest(const Locale& loc, const UnicodeString& expect, UDate expectDate, UErrorCode& status); 70 void checkConsistency(const char* locale); 71 72 int32_t daysToCheckInConsistency; 73 74 public: // package 75 // internal routine for checking date 76 static UnicodeString value(Calendar* calendar); 77 78 }; 79 80 81 #endif /* #if !UCONFIG_NO_FORMATTING */ 82 83 #endif // __IntlCalendarTest__ 84