• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2007 International Business Machines
2// Corporation and others. All Rights Reserved.
3calendar:table(nofallback) {
4    Info {
5        Description { "These are the data driven calendar tests" }
6        LongDescription {   "Data for data driven calendar tests." }
7    }
8    TestData {
9        TestCalendarConversion {
10            Headers { "locale","from","to" }
11            Info {
12                Description { "Test data for calendar conversion :" }
13            }
14            Settings {
15                {
16                    ToCalendar { "en_US@calendar=gregorian" }
17                    Type { "convert_fwd" }
18                },
19                {
20                    ToCalendar { "en_US@calendar=gregorian" }
21                    Type { "convert_rev" }
22                },
23            }
24            //   "0/1/1912/june/4 == gregorian year=1912, ERA=AD, same month, same day
25            Cases {
26               {
27                    "en_US@calendar=taiwan",
28                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw
29                    "ERA=1,YEAR=1912,MONTH=,DATE="     // greg
30               },
31               {
32                    "en_US@calendar=taiwan",
33                    "ERA=1,YEAR=3,MONTH=FEBRUARY,DATE=12",  // tw
34                    "ERA=1,YEAR=1914,MONTH=,DATE="     // greg
35               },
36               {
37                    "en_US@calendar=taiwan",
38                    "ERA=1,YEAR=96,MONTH=FEBRUARY,DATE=12",  // tw
39                    "ERA=1,YEAR=2007,MONTH=,DATE="     // greg
40               },
41               // before 1912:
42               // [before minguo]2   1[month] 24[day] -> 1910-1-24
43               {
44                    "en_US@calendar=taiwan",
45                    "ERA=0,YEAR=2,MONTH=JANUARY,DATE=24", // tw
46                    "ERA=1,YEAR=1910,MONTH=JANUARY,DATE=24", // greg
47               }
48            }
49        }
50        TestCalendarOperations {
51            Headers { "locale","from","operation","params","to" }
52            Info {
53                Description { "Test data for calendar operation :" }
54            }
55            Settings {
56                {
57                    Type { "ops" }
58                },
59            }
60            Cases {
61               {
62                    "en_US@calendar=taiwan",
63                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw
64                    "roll",
65                    "DATE=1", // date + 1
66                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=5",  // tw
67               },
68               {
69                    "en_US@calendar=taiwan",
70                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw
71                    "add",
72                    "DATE=1", // date + 1
73                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=5",  // tw
74               },
75               {
76                    "en_US@calendar=taiwan",
77                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw
78                    "roll",
79                    "YEAR=1", // date + 1
80                    "ERA=1,YEAR=2,MONTH=JUNE,DATE=4",  // tw
81               },
82               {
83                    "en_US@calendar=taiwan",
84                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw
85                    "add",
86                    "YEAR=1", // date + 1
87                    "ERA=1,YEAR=2,MONTH=JUNE,DATE=4",  // tw
88               },
89	    }
90        }
91    }
92}