Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: icu46/source/test/intltest/calcasts.h

Issue 5516007: Check in the pristine copy of ICU 4.6... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu46/source/test/intltest/bidiconf.cpp ('k') | icu46/source/test/intltest/calcasts.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu46/source/test/intltest/calcasts.h
===================================================================
--- icu46/source/test/intltest/calcasts.h (revision 0)
+++ icu46/source/test/intltest/calcasts.h (revision 0)
@@ -0,0 +1,65 @@
+/********************************************************************
+ * COPYRIGHT:
+ * Copyright (c) 2003-2008, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ********************************************************************
+ * Calendar Case Test is a type of CalendarTest which compares the
+ * behavior of a calendar to a certain set of 'test cases', involving
+ * conversion between julian-day to fields and vice versa.
+ ********************************************************************/
+
+#ifndef __CalendarCaseTest__
+#define __CalendarCaseTest__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/calendar.h"
+#include "unicode/smpdtfmt.h"
+#include "caltest.h"
+
+class CalendarCaseTest: public CalendarTest {
+ public:
+ virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+
+ /* Test case struct */
+ struct TestCase {
+ double julian; // Julian Date
+ int32_t era;
+ int32_t year;
+ int32_t month;
+ int32_t day;
+ int32_t dayOfWeek;
+ int32_t hour;
+ int32_t min;
+ int32_t sec;
+ };
+
+ /**
+ * @param cases array of items to test. Terminate with a "-1" for era.
+ */
+ void doTestCases(const TestCase *cases, Calendar *cal);
+
+ private:
+ /**
+ * Utility function to test out a specific field
+ * @param cal calendar
+ * @param field which field
+ * @param value expected value
+ * @param status err status
+ * @return boolean indicating success (TRUE) or failure (FALSE) of the test.
+ */
+ UBool checkField(Calendar *cal, UCalendarDateFields field, int32_t value, UErrorCode &status);
+
+ private:
+ // test cases
+ void IslamicCivil();
+ void Hebrew();
+ void Indian();
+ void Coptic();
+ void Ethiopic();
+};
+
+#endif
+#endif
Property changes on: icu46/source/test/intltest/calcasts.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « icu46/source/test/intltest/bidiconf.cpp ('k') | icu46/source/test/intltest/calcasts.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698