1 // xestiacalendar_icaltimezoneload.h - Xestia Calendar iCalendar Timezone Component Unit Tests
3 // (c) 2016-2017 Xestia Software Development.
5 // This file is part of Xestia Calendar.
7 // Xestia Calendar 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 Calendar 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);