1 // xestiacalendar_icaltimezoneload.h - Xestia Calendar iCalendar Timezone Component Unit Tests
3 // (c) 2016 Xestia Software Development.
5 // This file is part of Xestia Calendar.
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Calendar. If not, see <http://www.gnu.org/licenses/>
19 #include "../objects/calendartimezone/CalendarTimezone.h"
21 TEST(iCalendarTimezone, BasicTests){
23 CalendarTimezoneObject TestTimezone;
25 ASSERT_EQ(CALENDAROBJECTLOAD_MISSING, TestTimezone.LoadFile("iCalendarTimezone-Missing.vcf"));
26 ASSERT_EQ(CALENDAROBJECTLOAD_CANNOTOPEN, TestTimezone.LoadFile("iCalendarTimezone-InvalidPermissions.vcf"));
27 ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestTimezone.LoadFile("iCalendarTimezone-Load1.vcf"));
31 TEST(iCalendarTimezone, ObjectDataTests){
33 CalendarTimezoneObject TestTimezone;
34 ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestTimezone.LoadFile("iCalendarTimezone-Load2.vcf"));
35 ASSERT_EQ(CALENDAROBJECTVALID_OK, TestTimezone.ValidBaseObject());
39 ASSERT_EQ("Example/Starrgazy", TestTimezone.TimeZoneData);
40 ASSERT_EQ("OTHER=PARAM", TestTimezone.TimeZoneDataTokens);
42 // Tests for LAST-MODIFIED.
44 ASSERT_EQ("20160203T200700Z", TestTimezone.LastModifiedData);
45 ASSERT_EQ("FUTURE=ODD", TestTimezone.LastModifiedTokens);
49 ASSERT_EQ("http://www.example.com/", TestTimezone.TimeZoneURLData);
50 ASSERT_EQ("URL=YES", TestTimezone.TimeZoneURLTokens);
52 // Tests for the first STANDARD data.
54 std::string DateTimeStartData;
55 std::string TimeZoneOffsetToData;
56 std::string TimeZoneOffsetFromData;
58 if (TestTimezone.TimezoneStandardCollection.size() > 0){
60 DateTimeStartData = TestTimezone.TimezoneStandardCollection[0].DateTimeStartData;
64 if (TestTimezone.TimezoneStandardCollection.size() > 0){
66 TimeZoneOffsetToData = TestTimezone.TimezoneStandardCollection[0].TimeZoneOffsetToData;
70 if (TestTimezone.TimezoneStandardCollection.size() > 0){
72 TimeZoneOffsetFromData = TestTimezone.TimezoneStandardCollection[0].TimeZoneOffsetFromData;
76 ASSERT_EQ("20160204T020000", DateTimeStartData);
77 ASSERT_EQ("-0400", TimeZoneOffsetToData);
78 ASSERT_EQ("-0500", TimeZoneOffsetFromData);
80 // Tests for the second STANDARD data.
82 std::string DateTimeStartTokens;
83 std::string TimeZoneOffsetToTokens;
84 std::string TimeZoneOffsetFromTokens;
86 std::string RecurranceRuleData;
87 std::string RecurranceRuleDataTokens;
89 std::string CommentList;
90 std::string CommentListAltRep;
91 std::string CommentListLanguage;
92 std::string CommentListTokens;
94 std::string RecurranceDateData;
95 std::string RecurranceDateValue;
96 std::string RecurranceDateDataTimeZoneParam;
97 std::string RecurranceDateDataTokens;
99 std::string TimeZoneNameData;
100 std::string TimeZoneNameLanguage;
101 std::string TimeZoneNameTokens;
103 std::string XTokensData;
104 std::string XTokensDataTokens;
106 DateTimeStartData.clear();
107 TimeZoneOffsetToData.clear();
108 TimeZoneOffsetFromData.clear();
110 if (TestTimezone.TimezoneStandardCollection.size() > 1){
112 DateTimeStartData = TestTimezone.TimezoneStandardCollection[1].DateTimeStartData;
113 DateTimeStartTokens = TestTimezone.TimezoneStandardCollection[1].DateTimeStartTokens;
117 if (TestTimezone.TimezoneStandardCollection.size() > 1){
119 TimeZoneOffsetToData = TestTimezone.TimezoneStandardCollection[1].TimeZoneOffsetToData;
120 TimeZoneOffsetToTokens = TestTimezone.TimezoneStandardCollection[1].TimeZoneOffsetToTokens;
124 if (TestTimezone.TimezoneStandardCollection.size() > 1){
126 TimeZoneOffsetFromData = TestTimezone.TimezoneStandardCollection[1].TimeZoneOffsetFromData;
127 TimeZoneOffsetFromTokens = TestTimezone.TimezoneStandardCollection[1].TimeZoneOffsetFromTokens;
131 ASSERT_EQ("20160205T020000", DateTimeStartData);
132 ASSERT_EQ("MEEP=MOO", DateTimeStartTokens);
133 ASSERT_EQ("-0400", TimeZoneOffsetToData);
134 ASSERT_EQ("EXAMPLE=DATA", TimeZoneOffsetToTokens);
135 ASSERT_EQ("-0500", TimeZoneOffsetFromData);
136 ASSERT_EQ("LETS=GO", TimeZoneOffsetFromTokens);
138 // Tests for third STANDARD data.
140 DateTimeStartData.clear();
141 DateTimeStartTokens.clear();
142 TimeZoneOffsetToData.clear();
143 TimeZoneOffsetToTokens.clear();
144 TimeZoneOffsetFromData.clear();
145 TimeZoneOffsetFromTokens.clear();
147 if (TestTimezone.TimezoneStandardCollection.size() > 2){
149 DateTimeStartData = TestTimezone.TimezoneStandardCollection[2].DateTimeStartData;
150 DateTimeStartTokens = TestTimezone.TimezoneStandardCollection[2].DateTimeStartTokens;
154 if (TestTimezone.TimezoneStandardCollection.size() > 2){
156 TimeZoneOffsetToData = TestTimezone.TimezoneStandardCollection[2].TimeZoneOffsetToData;
157 TimeZoneOffsetToTokens = TestTimezone.TimezoneStandardCollection[2].TimeZoneOffsetToTokens;
161 if (TestTimezone.TimezoneStandardCollection.size() > 2){
163 TimeZoneOffsetFromData = TestTimezone.TimezoneStandardCollection[2].TimeZoneOffsetFromData;
164 TimeZoneOffsetFromTokens = TestTimezone.TimezoneStandardCollection[2].TimeZoneOffsetFromTokens;
168 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
169 TestTimezone.TimezoneStandardCollection[2].CommentList.size() > 0){
171 CommentList = TestTimezone.TimezoneStandardCollection[2].CommentList[0];
172 CommentListAltRep = TestTimezone.TimezoneStandardCollection[2].CommentListAltRep[0];
173 CommentListLanguage = TestTimezone.TimezoneStandardCollection[2].CommentListLanguage[0];
174 CommentListTokens = TestTimezone.TimezoneStandardCollection[2].CommentListTokens[0];
178 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
179 TestTimezone.TimezoneStandardCollection[2].RecurranceRuleData.size() > 0){
181 RecurranceRuleData = TestTimezone.TimezoneStandardCollection[2].RecurranceRuleData;
182 RecurranceRuleDataTokens = TestTimezone.TimezoneStandardCollection[2].RecurranceRuleDataTokens;
186 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
187 TestTimezone.TimezoneStandardCollection[2].RecurranceDateData.size() > 0){
189 RecurranceDateData = TestTimezone.TimezoneStandardCollection[2].RecurranceDateData[0];
190 RecurranceDateValue = TestTimezone.TimezoneStandardCollection[2].RecurranceDateDataValue[0];
191 RecurranceDateDataTimeZoneParam = TestTimezone.TimezoneStandardCollection[2].RecurranceDateDataTimeZoneParam[0];
192 RecurranceDateDataTokens = TestTimezone.TimezoneStandardCollection[2].RecurranceDateDataTokens[0];
196 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
197 TestTimezone.TimezoneStandardCollection[2].TimeZoneNameData.size() > 0){
199 TimeZoneNameData = TestTimezone.TimezoneStandardCollection[2].TimeZoneNameData[0];
200 TimeZoneNameLanguage = TestTimezone.TimezoneStandardCollection[2].TimeZoneNameLanguage[0];
201 TimeZoneNameTokens = TestTimezone.TimezoneStandardCollection[2].TimeZoneNameTokens[0];
205 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
206 TestTimezone.TimezoneStandardCollection[2].XTokensData.size() > 0){
208 XTokensData = TestTimezone.TimezoneStandardCollection[2].XTokensData[0];
209 XTokensDataTokens = TestTimezone.TimezoneStandardCollection[2].XTokensDataTokens[0];
213 ASSERT_EQ("20160206T020000", DateTimeStartData);
214 ASSERT_EQ("MEEP=MOO", DateTimeStartTokens);
215 ASSERT_EQ("-0400", TimeZoneOffsetToData);
216 ASSERT_EQ("EXAMPLE=DATA", TimeZoneOffsetToTokens);
217 ASSERT_EQ("-0500", TimeZoneOffsetFromData);
218 ASSERT_EQ("LETS=GO", TimeZoneOffsetFromTokens);
220 ASSERT_EQ("Example timezone comment.", CommentList);
221 ASSERT_EQ("null:nodata", CommentListAltRep);
222 ASSERT_EQ("kw", CommentListLanguage);
223 ASSERT_EQ("YO=YOYOS", CommentListTokens);
225 ASSERT_EQ("FREQ=DAILY;COUNT=10", RecurranceRuleData);
226 ASSERT_EQ("YAK=YES", RecurranceRuleDataTokens);
228 ASSERT_EQ("20160205,20160207,20160216,20160305", RecurranceDateData);
229 ASSERT_EQ("DATE", RecurranceDateValue);
230 ASSERT_EQ("Europe/Truro", RecurranceDateDataTimeZoneParam);
231 ASSERT_EQ("BEEP=BOOP", RecurranceDateDataTokens);
233 ASSERT_EQ("Example Timezone Name 1", TimeZoneNameData);
234 ASSERT_EQ("en", TimeZoneNameLanguage);
235 ASSERT_EQ("NOPE=YES", TimeZoneNameTokens);
237 ASSERT_EQ("Example Timezone Name 1", TimeZoneNameData);
238 ASSERT_EQ("en", TimeZoneNameLanguage);
240 ASSERT_EQ("Meep", XTokensData);
241 ASSERT_EQ("X-MOO", XTokensDataTokens);
244 XTokensDataTokens.clear();
246 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
247 TestTimezone.TimezoneStandardCollection[2].XTokensData.size() > 1){
249 XTokensData = TestTimezone.TimezoneStandardCollection[2].XTokensData[1];
250 XTokensDataTokens = TestTimezone.TimezoneStandardCollection[2].XTokensDataTokens[1];
254 ASSERT_EQ("Moop", XTokensData);
255 ASSERT_EQ("X-MOO", XTokensDataTokens);
258 XTokensDataTokens.clear();
260 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
261 TestTimezone.TimezoneStandardCollection[2].XTokensData.size() > 2){
263 XTokensData = TestTimezone.TimezoneStandardCollection[2].XTokensData[2];
264 XTokensDataTokens = TestTimezone.TimezoneStandardCollection[2].XTokensDataTokens[2];
268 ASSERT_EQ("Zaap", XTokensData);
269 ASSERT_EQ("X-MOO;MEEP=YIKES", XTokensDataTokens);
272 XTokensDataTokens.clear();
274 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
275 TestTimezone.TimezoneStandardCollection[2].XTokensData.size() > 3){
277 XTokensData = TestTimezone.TimezoneStandardCollection[2].XTokensData[3];
278 XTokensDataTokens = TestTimezone.TimezoneStandardCollection[2].XTokensDataTokens[3];
282 ASSERT_EQ("Fork", XTokensData);
283 ASSERT_EQ("X-ITEM", XTokensDataTokens);
286 XTokensDataTokens.clear();
288 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
289 TestTimezone.TimezoneStandardCollection[2].XTokensData.size() > 4){
291 XTokensData = TestTimezone.TimezoneStandardCollection[2].XTokensData[4];
292 XTokensDataTokens = TestTimezone.TimezoneStandardCollection[2].XTokensDataTokens[4];
296 ASSERT_EQ("Spoon", XTokensData);
297 ASSERT_EQ("X-ITEM", XTokensDataTokens);
300 XTokensDataTokens.clear();
302 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
303 TestTimezone.TimezoneStandardCollection[2].XTokensData.size() > 5){
305 XTokensData = TestTimezone.TimezoneStandardCollection[2].XTokensData[5];
306 XTokensDataTokens = TestTimezone.TimezoneStandardCollection[2].XTokensDataTokens[5];
310 ASSERT_EQ("Knife", XTokensData);
311 ASSERT_EQ("X-ITEM;DIRTY=NO", XTokensDataTokens);
314 XTokensDataTokens.clear();
316 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
317 TestTimezone.TimezoneStandardCollection[2].XTokensData.size() > 6){
319 XTokensData = TestTimezone.TimezoneStandardCollection[2].XTokensData[6];
320 XTokensDataTokens = TestTimezone.TimezoneStandardCollection[2].XTokensDataTokens[6];
324 ASSERT_EQ("1", XTokensData);
325 ASSERT_EQ("X-NOPE", XTokensDataTokens);
328 XTokensDataTokens.clear();
330 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
331 TestTimezone.TimezoneStandardCollection[2].XTokensData.size() > 7){
333 XTokensData = TestTimezone.TimezoneStandardCollection[2].XTokensData[7];
334 XTokensDataTokens = TestTimezone.TimezoneStandardCollection[2].XTokensDataTokens[7];
338 ASSERT_EQ("2", XTokensData);
339 ASSERT_EQ("X-NOPE", XTokensDataTokens);
342 XTokensDataTokens.clear();
344 if (TestTimezone.TimezoneStandardCollection.size() > 2 &&
345 TestTimezone.TimezoneStandardCollection[2].XTokensData.size() > 8){
347 XTokensData = TestTimezone.TimezoneStandardCollection[2].XTokensData[8];
348 XTokensDataTokens = TestTimezone.TimezoneStandardCollection[2].XTokensDataTokens[8];
352 ASSERT_EQ("3", XTokensData);
353 ASSERT_EQ("X-NOPE;LONG=YES", XTokensDataTokens);
355 // Tests for the first DAYLIGHT data.
357 DateTimeStartData.clear();
358 TimeZoneOffsetToData.clear();
359 TimeZoneOffsetFromData.clear();
361 if (TestTimezone.TimezoneDaylightCollection.size() > 0){
363 DateTimeStartData = TestTimezone.TimezoneDaylightCollection[0].DateTimeStartData;
367 if (TestTimezone.TimezoneDaylightCollection.size() > 0){
369 TimeZoneOffsetToData = TestTimezone.TimezoneDaylightCollection[0].TimeZoneOffsetToData;
373 if (TestTimezone.TimezoneDaylightCollection.size() > 0){
375 TimeZoneOffsetFromData = TestTimezone.TimezoneDaylightCollection[0].TimeZoneOffsetFromData;
379 ASSERT_EQ("20160204T020000", DateTimeStartData);
380 ASSERT_EQ("-0400", TimeZoneOffsetToData);
381 ASSERT_EQ("-0500", TimeZoneOffsetFromData);
383 // Tests for the second DAYLIGHT data.
385 DateTimeStartTokens.clear();
386 TimeZoneOffsetToTokens.clear();
387 TimeZoneOffsetFromTokens.clear();
389 RecurranceRuleData.clear();
390 RecurranceRuleDataTokens.clear();
393 CommentListAltRep.clear();
394 CommentListLanguage.clear();
395 CommentListTokens.clear();
397 RecurranceDateData.clear();
398 RecurranceDateValue.clear();
399 RecurranceDateDataTimeZoneParam.clear();
400 RecurranceDateDataTokens.clear();
402 TimeZoneNameData.clear();
403 TimeZoneNameLanguage.clear();
404 TimeZoneNameTokens.clear();
407 XTokensDataTokens.clear();
409 DateTimeStartData.clear();
410 TimeZoneOffsetToData.clear();
411 TimeZoneOffsetFromData.clear();
413 if (TestTimezone.TimezoneDaylightCollection.size() > 1){
415 DateTimeStartData = TestTimezone.TimezoneDaylightCollection[1].DateTimeStartData;
416 DateTimeStartTokens = TestTimezone.TimezoneDaylightCollection[1].DateTimeStartTokens;
420 if (TestTimezone.TimezoneDaylightCollection.size() > 1){
422 TimeZoneOffsetToData = TestTimezone.TimezoneDaylightCollection[1].TimeZoneOffsetToData;
423 TimeZoneOffsetToTokens = TestTimezone.TimezoneDaylightCollection[1].TimeZoneOffsetToTokens;
427 if (TestTimezone.TimezoneDaylightCollection.size() > 1){
429 TimeZoneOffsetFromData = TestTimezone.TimezoneDaylightCollection[1].TimeZoneOffsetFromData;
430 TimeZoneOffsetFromTokens = TestTimezone.TimezoneDaylightCollection[1].TimeZoneOffsetFromTokens;
434 ASSERT_EQ("20160205T020000", DateTimeStartData);
435 ASSERT_EQ("MEEP=MOO", DateTimeStartTokens);
436 ASSERT_EQ("-0400", TimeZoneOffsetToData);
437 ASSERT_EQ("EXAMPLE=DATA", TimeZoneOffsetToTokens);
438 ASSERT_EQ("-0500", TimeZoneOffsetFromData);
439 ASSERT_EQ("LETS=GO", TimeZoneOffsetFromTokens);
441 // Tests for third DAYLIGHT data.
443 DateTimeStartData.clear();
444 DateTimeStartTokens.clear();
445 TimeZoneOffsetToData.clear();
446 TimeZoneOffsetToTokens.clear();
447 TimeZoneOffsetFromData.clear();
448 TimeZoneOffsetFromTokens.clear();
450 if (TestTimezone.TimezoneDaylightCollection.size() > 2){
452 DateTimeStartData = TestTimezone.TimezoneDaylightCollection[2].DateTimeStartData;
453 DateTimeStartTokens = TestTimezone.TimezoneDaylightCollection[2].DateTimeStartTokens;
457 if (TestTimezone.TimezoneDaylightCollection.size() > 2){
459 TimeZoneOffsetToData = TestTimezone.TimezoneDaylightCollection[2].TimeZoneOffsetToData;
460 TimeZoneOffsetToTokens = TestTimezone.TimezoneDaylightCollection[2].TimeZoneOffsetToTokens;
464 if (TestTimezone.TimezoneDaylightCollection.size() > 2){
466 TimeZoneOffsetFromData = TestTimezone.TimezoneDaylightCollection[2].TimeZoneOffsetFromData;
467 TimeZoneOffsetFromTokens = TestTimezone.TimezoneDaylightCollection[2].TimeZoneOffsetFromTokens;
471 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
472 TestTimezone.TimezoneDaylightCollection[2].CommentList.size() > 0){
474 CommentList = TestTimezone.TimezoneDaylightCollection[2].CommentList[0];
475 CommentListAltRep = TestTimezone.TimezoneDaylightCollection[2].CommentListAltRep[0];
476 CommentListLanguage = TestTimezone.TimezoneDaylightCollection[2].CommentListLanguage[0];
477 CommentListTokens = TestTimezone.TimezoneDaylightCollection[2].CommentListTokens[0];
481 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
482 TestTimezone.TimezoneDaylightCollection[2].RecurranceRuleData.size() > 0){
484 RecurranceRuleData = TestTimezone.TimezoneDaylightCollection[2].RecurranceRuleData;
485 RecurranceRuleDataTokens = TestTimezone.TimezoneDaylightCollection[2].RecurranceRuleDataTokens;
489 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
490 TestTimezone.TimezoneDaylightCollection[2].RecurranceDateData.size() > 0){
492 RecurranceDateData = TestTimezone.TimezoneDaylightCollection[2].RecurranceDateData[0];
493 RecurranceDateValue = TestTimezone.TimezoneDaylightCollection[2].RecurranceDateDataValue[0];
494 RecurranceDateDataTimeZoneParam = TestTimezone.TimezoneDaylightCollection[2].RecurranceDateDataTimeZoneParam[0];
495 RecurranceDateDataTokens = TestTimezone.TimezoneDaylightCollection[2].RecurranceDateDataTokens[0];
499 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
500 TestTimezone.TimezoneDaylightCollection[2].TimeZoneNameData.size() > 0){
502 TimeZoneNameData = TestTimezone.TimezoneDaylightCollection[2].TimeZoneNameData[0];
503 TimeZoneNameLanguage = TestTimezone.TimezoneDaylightCollection[2].TimeZoneNameLanguage[0];
504 TimeZoneNameTokens = TestTimezone.TimezoneDaylightCollection[2].TimeZoneNameTokens[0];
508 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
509 TestTimezone.TimezoneDaylightCollection[2].XTokensData.size() > 0){
511 XTokensData = TestTimezone.TimezoneDaylightCollection[2].XTokensData[0];
512 XTokensDataTokens = TestTimezone.TimezoneDaylightCollection[2].XTokensDataTokens[0];
516 ASSERT_EQ("20160206T020000", DateTimeStartData);
517 ASSERT_EQ("MEEP=MOO", DateTimeStartTokens);
518 ASSERT_EQ("-0400", TimeZoneOffsetToData);
519 ASSERT_EQ("EXAMPLE=DATA", TimeZoneOffsetToTokens);
520 ASSERT_EQ("-0500", TimeZoneOffsetFromData);
521 ASSERT_EQ("LETS=GO", TimeZoneOffsetFromTokens);
523 ASSERT_EQ("Example timezone comment.", CommentList);
524 ASSERT_EQ("null:nodata", CommentListAltRep);
525 ASSERT_EQ("kw", CommentListLanguage);
526 ASSERT_EQ("YO=YOYOS", CommentListTokens);
528 ASSERT_EQ("FREQ=DAILY;COUNT=10", RecurranceRuleData);
529 ASSERT_EQ("YAK=YES", RecurranceRuleDataTokens);
531 ASSERT_EQ("20160205,20160207,20160216,20160305", RecurranceDateData);
532 ASSERT_EQ("DATE", RecurranceDateValue);
533 ASSERT_EQ("Europe/Truro", RecurranceDateDataTimeZoneParam);
534 ASSERT_EQ("BEEP=BOOP", RecurranceDateDataTokens);
536 ASSERT_EQ("Example Timezone Name 1", TimeZoneNameData);
537 ASSERT_EQ("en", TimeZoneNameLanguage);
538 ASSERT_EQ("NOPE=YES", TimeZoneNameTokens);
540 ASSERT_EQ("Example Timezone Name 1", TimeZoneNameData);
541 ASSERT_EQ("en", TimeZoneNameLanguage);
543 ASSERT_EQ("Meep", XTokensData);
544 ASSERT_EQ("X-MOO", XTokensDataTokens);
547 XTokensDataTokens.clear();
549 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
550 TestTimezone.TimezoneDaylightCollection[2].XTokensData.size() > 1){
552 XTokensData = TestTimezone.TimezoneDaylightCollection[2].XTokensData[1];
553 XTokensDataTokens = TestTimezone.TimezoneDaylightCollection[2].XTokensDataTokens[1];
557 ASSERT_EQ("Moop", XTokensData);
558 ASSERT_EQ("X-MOO", XTokensDataTokens);
561 XTokensDataTokens.clear();
563 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
564 TestTimezone.TimezoneDaylightCollection[2].XTokensData.size() > 2){
566 XTokensData = TestTimezone.TimezoneDaylightCollection[2].XTokensData[2];
567 XTokensDataTokens = TestTimezone.TimezoneDaylightCollection[2].XTokensDataTokens[2];
571 ASSERT_EQ("Zaap", XTokensData);
572 ASSERT_EQ("X-MOO;MEEP=YIKES", XTokensDataTokens);
575 XTokensDataTokens.clear();
577 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
578 TestTimezone.TimezoneDaylightCollection[2].XTokensData.size() > 3){
580 XTokensData = TestTimezone.TimezoneDaylightCollection[2].XTokensData[3];
581 XTokensDataTokens = TestTimezone.TimezoneDaylightCollection[2].XTokensDataTokens[3];
585 ASSERT_EQ("Fork", XTokensData);
586 ASSERT_EQ("X-ITEM", XTokensDataTokens);
589 XTokensDataTokens.clear();
591 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
592 TestTimezone.TimezoneDaylightCollection[2].XTokensData.size() > 4){
594 XTokensData = TestTimezone.TimezoneDaylightCollection[2].XTokensData[4];
595 XTokensDataTokens = TestTimezone.TimezoneDaylightCollection[2].XTokensDataTokens[4];
599 ASSERT_EQ("Spoon", XTokensData);
600 ASSERT_EQ("X-ITEM", XTokensDataTokens);
603 XTokensDataTokens.clear();
605 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
606 TestTimezone.TimezoneDaylightCollection[2].XTokensData.size() > 5){
608 XTokensData = TestTimezone.TimezoneDaylightCollection[2].XTokensData[5];
609 XTokensDataTokens = TestTimezone.TimezoneDaylightCollection[2].XTokensDataTokens[5];
613 ASSERT_EQ("Knife", XTokensData);
614 ASSERT_EQ("X-ITEM;DIRTY=NO", XTokensDataTokens);
617 XTokensDataTokens.clear();
619 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
620 TestTimezone.TimezoneDaylightCollection[2].XTokensData.size() > 6){
622 XTokensData = TestTimezone.TimezoneDaylightCollection[2].XTokensData[6];
623 XTokensDataTokens = TestTimezone.TimezoneDaylightCollection[2].XTokensDataTokens[6];
627 ASSERT_EQ("1", XTokensData);
628 ASSERT_EQ("X-NOPE", XTokensDataTokens);
631 XTokensDataTokens.clear();
633 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
634 TestTimezone.TimezoneDaylightCollection[2].XTokensData.size() > 7){
636 XTokensData = TestTimezone.TimezoneDaylightCollection[2].XTokensData[7];
637 XTokensDataTokens = TestTimezone.TimezoneDaylightCollection[2].XTokensDataTokens[7];
641 ASSERT_EQ("2", XTokensData);
642 ASSERT_EQ("X-NOPE", XTokensDataTokens);
645 XTokensDataTokens.clear();
647 if (TestTimezone.TimezoneDaylightCollection.size() > 2 &&
648 TestTimezone.TimezoneDaylightCollection[2].XTokensData.size() > 8){
650 XTokensData = TestTimezone.TimezoneDaylightCollection[2].XTokensData[8];
651 XTokensDataTokens = TestTimezone.TimezoneDaylightCollection[2].XTokensDataTokens[8];
655 ASSERT_EQ("3", XTokensData);
656 ASSERT_EQ("X-NOPE;LONG=YES", XTokensDataTokens);