1 // xestiacalendar_commonfunctions.h - Xestia Calendar Common Functions 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 "../common/file.h"
20 #include "../common/text.h"
21 #include "../common/colour.h"
22 #include "../common/monthviewgen.h"
24 TEST(CommonFunctions, FileTests){
26 ASSERT_EQ(false, FileExists("iCalendarEvent-Missing.vcf"));
27 ASSERT_EQ(true, FileExists("iCalendarEvent-InvalidPermissions.vcf"));
31 TEST(CommonFunctions, ProcessTextVectorsTests){
33 // Setup the objects to be used for processing.
35 vector<string> textPropertiesExample1;
36 vector<string> textValueExample1;
37 multimap<string, string> textExample1TestResult;
39 textPropertiesExample1.push_back("ATTENDEE");
40 textValueExample1.push_back("Example Attendee 1");
42 textPropertiesExample1.push_back("ATTENDEE");
43 textValueExample1.push_back("Example Attendee 2");
45 textPropertiesExample1.push_back("ATTENDEE");
46 textValueExample1.push_back("Example Attendee 3");
48 textPropertiesExample1.push_back("CATEGORIES");
49 textValueExample1.push_back("CATEGORY 1");
51 textPropertiesExample1.push_back("CATEGORIES");
52 textValueExample1.push_back("CATEGORY 2");
54 textPropertiesExample1.push_back("CATEGORIES");
55 textValueExample1.push_back("CATEGORY 3");
57 textPropertiesExample1.push_back("COMMENT");
58 textValueExample1.push_back("This is the first comment.");
60 textPropertiesExample1.push_back("COMMENT");
61 textValueExample1.push_back("This is the second comment.");
63 textPropertiesExample1.push_back("COMMENT");
64 textValueExample1.push_back("This is the third comment.");
66 textPropertiesExample1.push_back("CONTACT;TEST=VALUE");
67 textValueExample1.push_back("First Contact");
69 textPropertiesExample1.push_back("CONTACT;LAZY=NOPE");
70 textValueExample1.push_back("Second Contact");
72 textPropertiesExample1.push_back("CONTACT;SETUP=NO");
73 textValueExample1.push_back("Third Contact");
75 textPropertiesExample1.push_back("RESOURCES;ROOM=YES");
76 textValueExample1.push_back("First Resource Widget");
78 textPropertiesExample1.push_back("RESOURCES;ROOM=NO");
79 textValueExample1.push_back("Second Resource Widget");
81 textPropertiesExample1.push_back("RESOURCES;ROOM=UNKNOWN");
82 textValueExample1.push_back("Third Resource Widget");
84 textPropertiesExample1.push_back("RELATED;RELATION=NO");
85 textValueExample1.push_back("First Relation");
87 textPropertiesExample1.push_back("RELATED;RELATION=YES");
88 textValueExample1.push_back("Second Relation");
90 textPropertiesExample1.push_back("RELATED;RELATION=MAYBE");
91 textValueExample1.push_back("Third Relation");
93 // Examples 1 & 2: ATTENDEE
95 textExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 1"));
96 textExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 2"));
97 textExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 3"));
99 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "ATTENDEE"));
101 textExample1TestResult.clear();
102 textExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 1"));
104 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "ATTENDEE"));
106 // Examples 3 & 4: CATEGORIES
108 textExample1TestResult.clear();
109 textExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 1"));
110 textExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 2"));
111 textExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 3"));
113 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "CATEGORIES"));
115 textExample1TestResult.clear();
116 textExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 1"));
118 // Examples 5 & 6: COMMENT
120 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "CATEGORIES"));
122 textExample1TestResult.clear();
123 textExample1TestResult.insert(make_pair("COMMENT", "This is the first comment."));
124 textExample1TestResult.insert(make_pair("COMMENT", "This is the second comment."));
125 textExample1TestResult.insert(make_pair("COMMENT", "This is the third comment."));
127 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "COMMENT"));
129 textExample1TestResult.clear();
130 textExample1TestResult.insert(make_pair("COMMENT", "This is the first comment."));
132 // Examples 7 & 8: CONTACT;(properties)
134 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "COMMENT"));
136 textExample1TestResult.clear();
137 textExample1TestResult.insert(make_pair("CONTACT;TEST=VALUE", "First Contact"));
138 textExample1TestResult.insert(make_pair("CONTACT;LAZY=NOPE", "Second Contact"));
139 textExample1TestResult.insert(make_pair("CONTACT;SETUP=NO", "Third Contact"));
141 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "CONTACT"));
143 textExample1TestResult.clear();
144 textExample1TestResult.insert(make_pair("CONTACT;TEST=VALUE", "First Contact"));
146 // Examples 9 & 10: RESOURCES;(properties)
148 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "CONTACT"));
150 textExample1TestResult.clear();
151 textExample1TestResult.insert(make_pair("RESOURCES;ROOM=YES", "First Resource Widget"));
152 textExample1TestResult.insert(make_pair("RESOURCES;ROOM=NO", "Second Resource Widget"));
153 textExample1TestResult.insert(make_pair("RESOURCES;ROOM=UNKNOWN", "Third Resource Widget"));
155 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "RESOURCES"));
157 textExample1TestResult.clear();
158 textExample1TestResult.insert(make_pair("RESOURCES;ROOM=YES", "First Resource Widget"));
160 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "RESOURCES"));
162 // Examples 11 & 12: RELATED;(properties)
164 textExample1TestResult.clear();
165 textExample1TestResult.insert(make_pair("RELATED;RELATION=NO", "First Relation"));
166 textExample1TestResult.insert(make_pair("RELATED;RELATION=YES", "Second Relation"));
167 textExample1TestResult.insert(make_pair("RELATED;RELATION=MAYBE", "Third Relation"));
169 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "RELATED"));
171 textExample1TestResult.clear();
172 textExample1TestResult.insert(make_pair("RELATED;RELATION=NO", "First Relation"));
174 ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "RELATED"));
178 TEST(CommonFunctions, SplitValuesTests){
180 map<string, string> textExample1TestResult;
182 textExample1TestResult.insert(make_pair("RELATION", "NO"));
183 textExample1TestResult.insert(make_pair("TEST", "YES"));
184 textExample1TestResult.insert(make_pair("DATA", "SOMEDATA"));
186 ASSERT_EQ(textExample1TestResult, SplitValues("TEST;RELATION=NO;TEST=YES;DATA=SOMEDATA"));
190 TEST(CommonFunctions, SplitNameValueTests){
192 PropertyNameValue nameValueResult;
194 nameValueResult = SplitNameValue("TEST=OK");
196 string propertyName = nameValueResult.name;
197 string propertyValue = nameValueResult.value;
199 ASSERT_EQ(propertyName, "TEST");
200 ASSERT_EQ(propertyValue, "OK");
204 TEST(CommonFunctions, HexToInt){
206 string value1 = "10"; // 16
207 string value2 = "50"; // 80
208 string value3 = "4F"; // 79
209 string value4 = "FF"; // 255
210 string value5 = "FFF"; // 4095
211 string value6 = "FFFF"; // 65535
212 string value7 = "75AB"; // 30123
213 string value8 = "2AC"; // 684
214 string value9 = "!"; // Fail
215 string value10 = "4BZ"; // Fail
216 string value11 = "Z?!$"; // Fail
221 result = HexToInt(&value1, &outputValue);
223 ASSERT_EQ(result, true);
224 ASSERT_EQ(outputValue, 16);
226 result = HexToInt(&value2, &outputValue);
227 ASSERT_EQ(result, true);
228 ASSERT_EQ(outputValue, 80);
230 result = HexToInt(&value3, &outputValue);
231 ASSERT_EQ(result, true);
232 ASSERT_EQ(outputValue, 79);
234 result = HexToInt(&value4, &outputValue);
235 ASSERT_EQ(result, true);
236 ASSERT_EQ(outputValue, 255);
238 result = HexToInt(&value5, &outputValue);
239 ASSERT_EQ(result, true);
240 ASSERT_EQ(outputValue, 4095);
242 result = HexToInt(&value6, &outputValue);
243 ASSERT_EQ(result, true);
244 ASSERT_EQ(outputValue, 65535);
246 result = HexToInt(&value7, &outputValue);
247 ASSERT_EQ(result, true);
248 ASSERT_EQ(outputValue, 30123);
250 result = HexToInt(&value8, &outputValue);
251 ASSERT_EQ(result, true);
252 ASSERT_EQ(outputValue, 684);
254 result = HexToInt(&value9, &outputValue);
255 ASSERT_EQ(result, false);
257 result = HexToInt(&value10, &outputValue);
258 ASSERT_EQ(result, false);
260 result = HexToInt(&value11, &outputValue);
261 ASSERT_EQ(result, false);
265 TEST(CommonFunctions, SplitPathFilename){
267 // Setup the file split.
269 string pathFilenameOriginal = "/example/file/yay.txt";
273 SplitPathFilename(&pathFilenameOriginal, &path, &file);
275 ASSERT_EQ("/example/file/", path);
276 ASSERT_EQ("yay.txt", file);
278 pathFilenameOriginal = "/a/path/with/lots/of/bits/in/andthenthis.html";
282 SplitPathFilename(&pathFilenameOriginal, &path, &file);
284 ASSERT_EQ("/a/path/with/lots/of/bits/in/", path);
285 ASSERT_EQ("andthenthis.html", file);
287 pathFilenameOriginal = "/one/more/for/a/laugh/hahaha.zip";
291 SplitPathFilename(&pathFilenameOriginal, &path, &file);
293 ASSERT_EQ("/one/more/for/a/laugh/", path);
294 ASSERT_EQ("hahaha.zip", file);
298 TEST(CommonFunctions, ColourStruct){
325 ASSERT_EQ("#00000000", (string)colour1);
326 ASSERT_EQ("#FFFFFFFF", (string)colour2);
327 ASSERT_EQ("#10101010", (string)colour3);
328 ASSERT_EQ("#50505050", (string)colour4);
330 string colourInput1 = "#204040FF";
331 string colourInput2 = "#408080FF";
332 string colourInput3 = "#A0A0A000";
333 string colourInput4 = "#FFFFFF20";
340 colour5 = colourInput1;
341 colour6 = colourInput2;
342 colour7 = colourInput3;
343 colour8 = colourInput4;
345 ASSERT_EQ(32, colour5.red);
346 ASSERT_EQ(64, colour5.green);
347 ASSERT_EQ(64, colour5.blue);
348 ASSERT_EQ(255, colour5.alpha);
350 ASSERT_EQ(64, colour6.red);
351 ASSERT_EQ(128, colour6.green);
352 ASSERT_EQ(128, colour6.blue);
353 ASSERT_EQ(255, colour6.alpha);
355 ASSERT_EQ(160, colour7.red);
356 ASSERT_EQ(160, colour7.green);
357 ASSERT_EQ(160, colour7.blue);
358 ASSERT_EQ(0, colour7.alpha);
360 ASSERT_EQ(255, colour8.red);
361 ASSERT_EQ(255, colour8.green);
362 ASSERT_EQ(255, colour8.blue);
363 ASSERT_EQ(32, colour8.alpha);
366 TEST(CommonFunctions, OutputText){
368 string inputText1 = "This is an example text.";
369 string outputText1 = "This is an example text.";
370 string resultText1 = "";
372 string inputText2 = "This is the first sentence. This is the second sentence"
373 ". This is the third sentence. This is the fourth sentence. This "
374 "is the fifth sentence.";
375 string outputText2 = "This is the first sentence. This is the second sentence"
376 ". This is the third se\n ntence. This is the fourth sentence. This "
377 "is the fifth sentence.";
378 string resultText2 = "";
380 string inputText3 = "This is the first sentence. This is the second sentence"
381 ". This is the third sentence. This is the fourth sentence. This "
382 "is the fifth sentence. This is the sixth sentence. This is the s"
383 "eventh sentence. This is the eighth sentence. This is the ninth "
384 "sentence. This is the tenth sentence.";
385 string outputText3 = "This is the first sentence. This is the second sentence. This is the third se\n"
386 " ntence. This is the fourth sentence. This is the fifth sentence. This is the\n"
387 " sixth sentence. This is the seventh sentence. This is the eighth sentence. \n"
388 " This is the ninth sentence. This is the tenth sentence.";
389 string resultText3 = "";
391 string inputText4 = "This is the first sentence. This is the second sentence"
392 ". This is the third sentence. This is the fourth sentence. This "
393 "is the fifth sentence. This is the sixth sentence. This is the s"
394 "eventh sentence. This is the eighth sentence. This is the ninth "
395 "sentence. This is the tenth sentence. This is the eleventh sente"
396 "nce. This is the twelfth sentence. This is the thirteenth senten"
397 "ce. This is the fourteenth sentence. This is the fifteenth sente"
399 string outputText4 = "This is the first sentence. This is the second sentence. This is the third se\n"
400 " ntence. This is the fourth sentence. This is the fifth sentence. This is the\n"
401 " sixth sentence. This is the seventh sentence. This is the eighth sentence. \n"
402 " This is the ninth sentence. This is the tenth sentence. This is the eleventh\n"
403 " sentence. This is the twelfth sentence. This is the thirteenth sentence. Th\n"
404 " is is the fourteenth sentence. This is the fifteenth sentence.";
405 string resultText4 = "";
407 string inputText5 = "This is the first sentence. This is the second sentence"
408 ". This is the third sentence. This is the fourth sentence. This "
409 "is the fifth sentence. This is the sixth sentence. This is the s"
410 "eventh sentence. This is the eighth sentence. This is the ninth "
411 "sentence. This is the tenth sentence. This is the eleventh sente"
412 "nce. This is the twelfth sentence. This is the thirteenth senten"
413 "ce. This is the fourteenth sentence. This is the fifteenth sente"
414 "nce. This is the sixteenth sentence. This is the seventeenth sen"
415 "tence. This is the eighteenth sentence. This is the ninteenth se"
416 "ntence. This is the twentieth sentence.";
417 string outputText5 = "This is the first sentence. This is the second sentence. This is the third se\n"
418 " ntence. This is the fourth sentence. This is the fifth sentence. This is the\n"
419 " sixth sentence. This is the seventh sentence. This is the eighth sentence. \n"
420 " This is the ninth sentence. This is the tenth sentence. This is the eleventh\n"
421 " sentence. This is the twelfth sentence. This is the thirteenth sentence. Th\n"
422 " is is the fourteenth sentence. This is the fifteenth sentence. This is the s\n"
423 " ixteenth sentence. This is the seventeenth sentence. This is the eighteenth \n"
424 " sentence. This is the ninteenth sentence. This is the twentieth sentence.";
427 resultText1 = OutputText(&inputText1);
428 resultText2 = OutputText(&inputText2);
429 resultText3 = OutputText(&inputText3);
430 resultText4 = OutputText(&inputText4);
431 resultText5 = OutputText(&inputText5);
433 ASSERT_EQ(resultText1, outputText1);
434 ASSERT_EQ(resultText2, outputText2);
435 ASSERT_EQ(resultText3, outputText3);
436 ASSERT_EQ(resultText4, outputText4);
437 ASSERT_EQ(resultText5, outputText5);
441 TEST(CommonFunctions, PreviousMonthNumberofDays){
443 // Test the year 2015 (does not have a leap year).
445 ASSERT_EQ(30, PreviousMonthNumberofDays(12, 2015));
447 // Test the year 2016 (has a leap year).
449 ASSERT_EQ(31, PreviousMonthNumberofDays(1, 2016));
450 ASSERT_EQ(31, PreviousMonthNumberofDays(2, 2016));
451 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2016));
452 ASSERT_EQ(31, PreviousMonthNumberofDays(4, 2016));
453 ASSERT_EQ(30, PreviousMonthNumberofDays(5, 2016));
454 ASSERT_EQ(31, PreviousMonthNumberofDays(6, 2016));
455 ASSERT_EQ(30, PreviousMonthNumberofDays(7, 2016));
456 ASSERT_EQ(31, PreviousMonthNumberofDays(8, 2016));
457 ASSERT_EQ(31, PreviousMonthNumberofDays(9, 2016));
458 ASSERT_EQ(30, PreviousMonthNumberofDays(10, 2016));
459 ASSERT_EQ(31, PreviousMonthNumberofDays(11, 2016));
460 ASSERT_EQ(30, PreviousMonthNumberofDays(12, 2016));
461 ASSERT_EQ(31, PreviousMonthNumberofDays(1, 2017));
463 // Test the leap year section.
465 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2016));
466 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2012));
467 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2008));
468 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2004));
469 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2000));
471 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2015));
472 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2014));
473 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2013));
475 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2041));
476 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2042));
477 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2043));
478 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2044));
479 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2045));
480 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2046));
481 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2047));
482 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2048));
483 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2049));
484 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2050));
486 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 1900));
487 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2200));
488 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2300));
489 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2400));
490 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2500));
491 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2600));
492 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2700));
493 ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2800));
494 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2900));
495 ASSERT_EQ(28, PreviousMonthNumberofDays(3, 3000));
499 TEST(CommonFunctions, monthViewGenerator){
501 XCCalendarMonthViewGrid monthView = GenerateMonthGrid(6, 2016);
505 ASSERT_EQ(30, monthView.weekList[0].dayList[0].day);
506 ASSERT_EQ(5, monthView.weekList[0].dayList[0].month);
507 ASSERT_EQ(2016, monthView.weekList[0].dayList[0].year);
508 ASSERT_EQ(false, monthView.weekList[0].dayList[0].isInMonth);
510 ASSERT_EQ(31, monthView.weekList[0].dayList[1].day);
511 ASSERT_EQ(5, monthView.weekList[0].dayList[1].month);
512 ASSERT_EQ(2016, monthView.weekList[0].dayList[1].year);
513 ASSERT_EQ(false, monthView.weekList[0].dayList[1].isInMonth);
515 ASSERT_EQ(1, monthView.weekList[0].dayList[2].day);
516 ASSERT_EQ(6, monthView.weekList[0].dayList[2].month);
517 ASSERT_EQ(2016, monthView.weekList[0].dayList[2].year);
518 ASSERT_EQ(true, monthView.weekList[0].dayList[2].isInMonth);
520 ASSERT_EQ(2, monthView.weekList[0].dayList[3].day);
521 ASSERT_EQ(6, monthView.weekList[0].dayList[3].month);
522 ASSERT_EQ(2016, monthView.weekList[0].dayList[3].year);
523 ASSERT_EQ(true, monthView.weekList[0].dayList[3].isInMonth);
525 ASSERT_EQ(3, monthView.weekList[0].dayList[4].day);
526 ASSERT_EQ(6, monthView.weekList[0].dayList[4].month);
527 ASSERT_EQ(2016, monthView.weekList[0].dayList[4].year);
528 ASSERT_EQ(true, monthView.weekList[0].dayList[4].isInMonth);
530 ASSERT_EQ(4, monthView.weekList[0].dayList[5].day);
531 ASSERT_EQ(6, monthView.weekList[0].dayList[5].month);
532 ASSERT_EQ(2016, monthView.weekList[0].dayList[5].year);
533 ASSERT_EQ(true, monthView.weekList[0].dayList[5].isInMonth);
535 ASSERT_EQ(5, monthView.weekList[0].dayList[6].day);
536 ASSERT_EQ(6, monthView.weekList[0].dayList[6].month);
537 ASSERT_EQ(2016, monthView.weekList[0].dayList[6].year);
538 ASSERT_EQ(true, monthView.weekList[0].dayList[6].isInMonth);
542 ASSERT_EQ(6, monthView.weekList[1].dayList[0].day);
543 ASSERT_EQ(6, monthView.weekList[1].dayList[0].month);
544 ASSERT_EQ(2016, monthView.weekList[1].dayList[0].year);
545 ASSERT_EQ(true, monthView.weekList[1].dayList[0].isInMonth);
547 ASSERT_EQ(7, monthView.weekList[1].dayList[1].day);
548 ASSERT_EQ(6, monthView.weekList[1].dayList[1].month);
549 ASSERT_EQ(2016, monthView.weekList[1].dayList[1].year);
550 ASSERT_EQ(true, monthView.weekList[1].dayList[1].isInMonth);
552 ASSERT_EQ(8, monthView.weekList[1].dayList[2].day);
553 ASSERT_EQ(6, monthView.weekList[1].dayList[2].month);
554 ASSERT_EQ(2016, monthView.weekList[1].dayList[2].year);
555 ASSERT_EQ(true, monthView.weekList[1].dayList[2].isInMonth);
557 ASSERT_EQ(9, monthView.weekList[1].dayList[3].day);
558 ASSERT_EQ(6, monthView.weekList[1].dayList[3].month);
559 ASSERT_EQ(2016, monthView.weekList[1].dayList[3].year);
560 ASSERT_EQ(true, monthView.weekList[1].dayList[3].isInMonth);
562 ASSERT_EQ(10, monthView.weekList[1].dayList[4].day);
563 ASSERT_EQ(6, monthView.weekList[1].dayList[4].month);
564 ASSERT_EQ(2016, monthView.weekList[1].dayList[4].year);
565 ASSERT_EQ(true, monthView.weekList[1].dayList[4].isInMonth);
567 ASSERT_EQ(11, monthView.weekList[1].dayList[5].day);
568 ASSERT_EQ(6, monthView.weekList[1].dayList[5].month);
569 ASSERT_EQ(2016, monthView.weekList[1].dayList[5].year);
570 ASSERT_EQ(true, monthView.weekList[1].dayList[5].isInMonth);
572 ASSERT_EQ(12, monthView.weekList[1].dayList[6].day);
573 ASSERT_EQ(6, monthView.weekList[1].dayList[6].month);
574 ASSERT_EQ(2016, monthView.weekList[1].dayList[6].year);
575 ASSERT_EQ(true, monthView.weekList[1].dayList[6].isInMonth);
579 ASSERT_EQ(13, monthView.weekList[2].dayList[0].day);
580 ASSERT_EQ(6, monthView.weekList[2].dayList[0].month);
581 ASSERT_EQ(2016, monthView.weekList[2].dayList[0].year);
582 ASSERT_EQ(true, monthView.weekList[2].dayList[0].isInMonth);
584 ASSERT_EQ(14, monthView.weekList[2].dayList[1].day);
585 ASSERT_EQ(6, monthView.weekList[2].dayList[1].month);
586 ASSERT_EQ(2016, monthView.weekList[2].dayList[1].year);
587 ASSERT_EQ(true, monthView.weekList[2].dayList[1].isInMonth);
589 ASSERT_EQ(15, monthView.weekList[2].dayList[2].day);
590 ASSERT_EQ(6, monthView.weekList[2].dayList[2].month);
591 ASSERT_EQ(2016, monthView.weekList[2].dayList[2].year);
592 ASSERT_EQ(true, monthView.weekList[2].dayList[2].isInMonth);
594 ASSERT_EQ(16, monthView.weekList[2].dayList[3].day);
595 ASSERT_EQ(6, monthView.weekList[2].dayList[3].month);
596 ASSERT_EQ(2016, monthView.weekList[2].dayList[3].year);
597 ASSERT_EQ(true, monthView.weekList[2].dayList[3].isInMonth);
599 ASSERT_EQ(17, monthView.weekList[2].dayList[4].day);
600 ASSERT_EQ(6, monthView.weekList[2].dayList[4].month);
601 ASSERT_EQ(2016, monthView.weekList[2].dayList[4].year);
602 ASSERT_EQ(true, monthView.weekList[2].dayList[4].isInMonth);
604 ASSERT_EQ(18, monthView.weekList[2].dayList[5].day);
605 ASSERT_EQ(6, monthView.weekList[2].dayList[5].month);
606 ASSERT_EQ(2016, monthView.weekList[2].dayList[5].year);
607 ASSERT_EQ(true, monthView.weekList[2].dayList[5].isInMonth);
609 ASSERT_EQ(19, monthView.weekList[2].dayList[6].day);
610 ASSERT_EQ(6, monthView.weekList[2].dayList[6].month);
611 ASSERT_EQ(2016, monthView.weekList[2].dayList[6].year);
612 ASSERT_EQ(true, monthView.weekList[2].dayList[6].isInMonth);
616 ASSERT_EQ(20, monthView.weekList[3].dayList[0].day);
617 ASSERT_EQ(6, monthView.weekList[3].dayList[0].month);
618 ASSERT_EQ(2016, monthView.weekList[3].dayList[0].year);
619 ASSERT_EQ(true, monthView.weekList[3].dayList[0].isInMonth);
621 ASSERT_EQ(21, monthView.weekList[3].dayList[1].day);
622 ASSERT_EQ(6, monthView.weekList[3].dayList[1].month);
623 ASSERT_EQ(2016, monthView.weekList[3].dayList[1].year);
624 ASSERT_EQ(true, monthView.weekList[3].dayList[1].isInMonth);
626 ASSERT_EQ(22, monthView.weekList[3].dayList[2].day);
627 ASSERT_EQ(6, monthView.weekList[3].dayList[2].month);
628 ASSERT_EQ(2016, monthView.weekList[3].dayList[2].year);
629 ASSERT_EQ(true, monthView.weekList[3].dayList[2].isInMonth);
631 ASSERT_EQ(23, monthView.weekList[3].dayList[3].day);
632 ASSERT_EQ(6, monthView.weekList[3].dayList[3].month);
633 ASSERT_EQ(2016, monthView.weekList[3].dayList[3].year);
634 ASSERT_EQ(true, monthView.weekList[3].dayList[3].isInMonth);
636 ASSERT_EQ(24, monthView.weekList[3].dayList[4].day);
637 ASSERT_EQ(6, monthView.weekList[3].dayList[4].month);
638 ASSERT_EQ(2016, monthView.weekList[3].dayList[4].year);
639 ASSERT_EQ(true, monthView.weekList[3].dayList[4].isInMonth);
641 ASSERT_EQ(25, monthView.weekList[3].dayList[5].day);
642 ASSERT_EQ(6, monthView.weekList[3].dayList[5].month);
643 ASSERT_EQ(2016, monthView.weekList[3].dayList[5].year);
644 ASSERT_EQ(true, monthView.weekList[3].dayList[5].isInMonth);
646 ASSERT_EQ(26, monthView.weekList[3].dayList[6].day);
647 ASSERT_EQ(6, monthView.weekList[3].dayList[6].month);
648 ASSERT_EQ(2016, monthView.weekList[3].dayList[6].year);
649 ASSERT_EQ(true, monthView.weekList[3].dayList[6].isInMonth);
653 ASSERT_EQ(27, monthView.weekList[4].dayList[0].day);
654 ASSERT_EQ(6, monthView.weekList[4].dayList[0].month);
655 ASSERT_EQ(2016, monthView.weekList[4].dayList[0].year);
656 ASSERT_EQ(true, monthView.weekList[4].dayList[0].isInMonth);
658 ASSERT_EQ(28, monthView.weekList[4].dayList[1].day);
659 ASSERT_EQ(6, monthView.weekList[4].dayList[1].month);
660 ASSERT_EQ(2016, monthView.weekList[4].dayList[1].year);
661 ASSERT_EQ(true, monthView.weekList[4].dayList[1].isInMonth);
663 ASSERT_EQ(29, monthView.weekList[4].dayList[2].day);
664 ASSERT_EQ(6, monthView.weekList[4].dayList[2].month);
665 ASSERT_EQ(2016, monthView.weekList[4].dayList[2].year);
666 ASSERT_EQ(true, monthView.weekList[4].dayList[2].isInMonth);
668 ASSERT_EQ(30, monthView.weekList[4].dayList[3].day);
669 ASSERT_EQ(6, monthView.weekList[4].dayList[3].month);
670 ASSERT_EQ(2016, monthView.weekList[4].dayList[3].year);
671 ASSERT_EQ(true, monthView.weekList[4].dayList[3].isInMonth);
673 ASSERT_EQ(1, monthView.weekList[4].dayList[4].day);
674 ASSERT_EQ(7, monthView.weekList[4].dayList[4].month);
675 ASSERT_EQ(2016, monthView.weekList[4].dayList[4].year);
676 ASSERT_EQ(false, monthView.weekList[4].dayList[4].isInMonth);
678 ASSERT_EQ(2, monthView.weekList[4].dayList[5].day);
679 ASSERT_EQ(7, monthView.weekList[4].dayList[5].month);
680 ASSERT_EQ(2016, monthView.weekList[4].dayList[5].year);
681 ASSERT_EQ(false, monthView.weekList[4].dayList[5].isInMonth);
683 ASSERT_EQ(3, monthView.weekList[4].dayList[6].day);
684 ASSERT_EQ(7, monthView.weekList[4].dayList[6].month);
685 ASSERT_EQ(2016, monthView.weekList[4].dayList[6].year);
686 ASSERT_EQ(false, monthView.weekList[4].dayList[6].isInMonth);
688 // Test February 2016 (leap year).
690 monthView = GenerateMonthGrid(2, 2016);
694 ASSERT_EQ(1, monthView.weekList[0].dayList[0].day);
695 ASSERT_EQ(2, monthView.weekList[0].dayList[0].month);
696 ASSERT_EQ(2016, monthView.weekList[0].dayList[0].year);
697 ASSERT_EQ(true, monthView.weekList[0].dayList[0].isInMonth);
699 ASSERT_EQ(2, monthView.weekList[0].dayList[1].day);
700 ASSERT_EQ(2, monthView.weekList[0].dayList[1].month);
701 ASSERT_EQ(2016, monthView.weekList[0].dayList[1].year);
702 ASSERT_EQ(true, monthView.weekList[0].dayList[1].isInMonth);
704 ASSERT_EQ(3, monthView.weekList[0].dayList[2].day);
705 ASSERT_EQ(2, monthView.weekList[0].dayList[2].month);
706 ASSERT_EQ(2016, monthView.weekList[0].dayList[2].year);
707 ASSERT_EQ(true, monthView.weekList[0].dayList[2].isInMonth);
709 ASSERT_EQ(4, monthView.weekList[0].dayList[3].day);
710 ASSERT_EQ(2, monthView.weekList[0].dayList[3].month);
711 ASSERT_EQ(2016, monthView.weekList[0].dayList[3].year);
712 ASSERT_EQ(true, monthView.weekList[0].dayList[3].isInMonth);
714 ASSERT_EQ(5, monthView.weekList[0].dayList[4].day);
715 ASSERT_EQ(2, monthView.weekList[0].dayList[4].month);
716 ASSERT_EQ(2016, monthView.weekList[0].dayList[4].year);
717 ASSERT_EQ(true, monthView.weekList[0].dayList[4].isInMonth);
719 ASSERT_EQ(6, monthView.weekList[0].dayList[5].day);
720 ASSERT_EQ(2, monthView.weekList[0].dayList[5].month);
721 ASSERT_EQ(2016, monthView.weekList[0].dayList[5].year);
722 ASSERT_EQ(true, monthView.weekList[0].dayList[5].isInMonth);
724 ASSERT_EQ(7, monthView.weekList[0].dayList[6].day);
725 ASSERT_EQ(2, monthView.weekList[0].dayList[6].month);
726 ASSERT_EQ(2016, monthView.weekList[0].dayList[6].year);
727 ASSERT_EQ(true, monthView.weekList[0].dayList[6].isInMonth);
731 ASSERT_EQ(8, monthView.weekList[1].dayList[0].day);
732 ASSERT_EQ(2, monthView.weekList[1].dayList[0].month);
733 ASSERT_EQ(2016, monthView.weekList[1].dayList[0].year);
734 ASSERT_EQ(true, monthView.weekList[1].dayList[0].isInMonth);
736 ASSERT_EQ(9, monthView.weekList[1].dayList[1].day);
737 ASSERT_EQ(2, monthView.weekList[1].dayList[1].month);
738 ASSERT_EQ(2016, monthView.weekList[1].dayList[1].year);
739 ASSERT_EQ(true, monthView.weekList[1].dayList[1].isInMonth);
741 ASSERT_EQ(10, monthView.weekList[1].dayList[2].day);
742 ASSERT_EQ(2, monthView.weekList[1].dayList[2].month);
743 ASSERT_EQ(2016, monthView.weekList[1].dayList[2].year);
744 ASSERT_EQ(true, monthView.weekList[1].dayList[2].isInMonth);
746 ASSERT_EQ(11, monthView.weekList[1].dayList[3].day);
747 ASSERT_EQ(2, monthView.weekList[1].dayList[3].month);
748 ASSERT_EQ(2016, monthView.weekList[1].dayList[3].year);
749 ASSERT_EQ(true, monthView.weekList[1].dayList[3].isInMonth);
751 ASSERT_EQ(12, monthView.weekList[1].dayList[4].day);
752 ASSERT_EQ(2, monthView.weekList[1].dayList[4].month);
753 ASSERT_EQ(2016, monthView.weekList[1].dayList[4].year);
754 ASSERT_EQ(true, monthView.weekList[1].dayList[4].isInMonth);
756 ASSERT_EQ(13, monthView.weekList[1].dayList[5].day);
757 ASSERT_EQ(2, monthView.weekList[1].dayList[5].month);
758 ASSERT_EQ(2016, monthView.weekList[1].dayList[5].year);
759 ASSERT_EQ(true, monthView.weekList[1].dayList[5].isInMonth);
761 ASSERT_EQ(14, monthView.weekList[1].dayList[6].day);
762 ASSERT_EQ(2, monthView.weekList[1].dayList[6].month);
763 ASSERT_EQ(2016, monthView.weekList[1].dayList[6].year);
764 ASSERT_EQ(true, monthView.weekList[1].dayList[6].isInMonth);
768 ASSERT_EQ(15, monthView.weekList[2].dayList[0].day);
769 ASSERT_EQ(2, monthView.weekList[2].dayList[0].month);
770 ASSERT_EQ(2016, monthView.weekList[2].dayList[0].year);
771 ASSERT_EQ(true, monthView.weekList[2].dayList[0].isInMonth);
773 ASSERT_EQ(16, monthView.weekList[2].dayList[1].day);
774 ASSERT_EQ(2, monthView.weekList[2].dayList[1].month);
775 ASSERT_EQ(2016, monthView.weekList[2].dayList[1].year);
776 ASSERT_EQ(true, monthView.weekList[2].dayList[1].isInMonth);
778 ASSERT_EQ(17, monthView.weekList[2].dayList[2].day);
779 ASSERT_EQ(2, monthView.weekList[2].dayList[2].month);
780 ASSERT_EQ(2016, monthView.weekList[2].dayList[2].year);
781 ASSERT_EQ(true, monthView.weekList[2].dayList[2].isInMonth);
783 ASSERT_EQ(18, monthView.weekList[2].dayList[3].day);
784 ASSERT_EQ(2, monthView.weekList[2].dayList[3].month);
785 ASSERT_EQ(2016, monthView.weekList[2].dayList[3].year);
786 ASSERT_EQ(true, monthView.weekList[2].dayList[3].isInMonth);
788 ASSERT_EQ(19, monthView.weekList[2].dayList[4].day);
789 ASSERT_EQ(2, monthView.weekList[2].dayList[4].month);
790 ASSERT_EQ(2016, monthView.weekList[2].dayList[4].year);
791 ASSERT_EQ(true, monthView.weekList[2].dayList[4].isInMonth);
793 ASSERT_EQ(20, monthView.weekList[2].dayList[5].day);
794 ASSERT_EQ(2, monthView.weekList[2].dayList[5].month);
795 ASSERT_EQ(2016, monthView.weekList[2].dayList[5].year);
796 ASSERT_EQ(true, monthView.weekList[2].dayList[5].isInMonth);
798 ASSERT_EQ(21, monthView.weekList[2].dayList[6].day);
799 ASSERT_EQ(2, monthView.weekList[2].dayList[6].month);
800 ASSERT_EQ(2016, monthView.weekList[2].dayList[6].year);
801 ASSERT_EQ(true, monthView.weekList[2].dayList[6].isInMonth);
805 ASSERT_EQ(22, monthView.weekList[3].dayList[0].day);
806 ASSERT_EQ(2, monthView.weekList[3].dayList[0].month);
807 ASSERT_EQ(2016, monthView.weekList[3].dayList[0].year);
808 ASSERT_EQ(true, monthView.weekList[3].dayList[0].isInMonth);
810 ASSERT_EQ(23, monthView.weekList[3].dayList[1].day);
811 ASSERT_EQ(2, monthView.weekList[3].dayList[1].month);
812 ASSERT_EQ(2016, monthView.weekList[3].dayList[1].year);
813 ASSERT_EQ(true, monthView.weekList[3].dayList[1].isInMonth);
815 ASSERT_EQ(24, monthView.weekList[3].dayList[2].day);
816 ASSERT_EQ(2, monthView.weekList[3].dayList[2].month);
817 ASSERT_EQ(2016, monthView.weekList[3].dayList[2].year);
818 ASSERT_EQ(true, monthView.weekList[3].dayList[2].isInMonth);
820 ASSERT_EQ(25, monthView.weekList[3].dayList[3].day);
821 ASSERT_EQ(2, monthView.weekList[3].dayList[3].month);
822 ASSERT_EQ(2016, monthView.weekList[3].dayList[3].year);
823 ASSERT_EQ(true, monthView.weekList[3].dayList[3].isInMonth);
825 ASSERT_EQ(26, monthView.weekList[3].dayList[4].day);
826 ASSERT_EQ(2, monthView.weekList[3].dayList[4].month);
827 ASSERT_EQ(2016, monthView.weekList[3].dayList[4].year);
828 ASSERT_EQ(true, monthView.weekList[3].dayList[4].isInMonth);
830 ASSERT_EQ(27, monthView.weekList[3].dayList[5].day);
831 ASSERT_EQ(2, monthView.weekList[3].dayList[5].month);
832 ASSERT_EQ(2016, monthView.weekList[3].dayList[5].year);
833 ASSERT_EQ(true, monthView.weekList[3].dayList[5].isInMonth);
835 ASSERT_EQ(28, monthView.weekList[3].dayList[6].day);
836 ASSERT_EQ(2, monthView.weekList[3].dayList[6].month);
837 ASSERT_EQ(2016, monthView.weekList[3].dayList[6].year);
838 ASSERT_EQ(true, monthView.weekList[3].dayList[6].isInMonth);
842 ASSERT_EQ(29, monthView.weekList[4].dayList[0].day);
843 ASSERT_EQ(2, monthView.weekList[4].dayList[0].month);
844 ASSERT_EQ(2016, monthView.weekList[4].dayList[0].year);
845 ASSERT_EQ(true, monthView.weekList[4].dayList[0].isInMonth);
847 ASSERT_EQ(1, monthView.weekList[4].dayList[1].day);
848 ASSERT_EQ(3, monthView.weekList[4].dayList[1].month);
849 ASSERT_EQ(2016, monthView.weekList[4].dayList[1].year);
850 ASSERT_EQ(false, monthView.weekList[4].dayList[1].isInMonth);
852 ASSERT_EQ(2, monthView.weekList[4].dayList[2].day);
853 ASSERT_EQ(3, monthView.weekList[4].dayList[2].month);
854 ASSERT_EQ(2016, monthView.weekList[4].dayList[2].year);
855 ASSERT_EQ(false, monthView.weekList[4].dayList[2].isInMonth);
857 ASSERT_EQ(3, monthView.weekList[4].dayList[3].day);
858 ASSERT_EQ(3, monthView.weekList[4].dayList[3].month);
859 ASSERT_EQ(2016, monthView.weekList[4].dayList[3].year);
860 ASSERT_EQ(false, monthView.weekList[4].dayList[3].isInMonth);
862 ASSERT_EQ(4, monthView.weekList[4].dayList[4].day);
863 ASSERT_EQ(3, monthView.weekList[4].dayList[4].month);
864 ASSERT_EQ(2016, monthView.weekList[4].dayList[4].year);
865 ASSERT_EQ(false, monthView.weekList[4].dayList[4].isInMonth);
867 ASSERT_EQ(5, monthView.weekList[4].dayList[5].day);
868 ASSERT_EQ(3, monthView.weekList[4].dayList[5].month);
869 ASSERT_EQ(2016, monthView.weekList[4].dayList[5].year);
870 ASSERT_EQ(false, monthView.weekList[4].dayList[5].isInMonth);
872 ASSERT_EQ(6, monthView.weekList[4].dayList[6].day);
873 ASSERT_EQ(3, monthView.weekList[4].dayList[6].month);
874 ASSERT_EQ(2016, monthView.weekList[4].dayList[6].year);
875 ASSERT_EQ(false, monthView.weekList[4].dayList[6].isInMonth);
877 // Generate a month grid for February 2100 (not a leap year).
879 monthView = GenerateMonthGrid(2, 2100);
883 ASSERT_EQ(4, monthView.weekList.size());
885 ASSERT_EQ(1, monthView.weekList[0].dayList[0].day);
886 ASSERT_EQ(2, monthView.weekList[0].dayList[0].month);
887 ASSERT_EQ(2100, monthView.weekList[0].dayList[0].year);
888 ASSERT_EQ(true, monthView.weekList[0].dayList[0].isInMonth);
890 ASSERT_EQ(2, monthView.weekList[0].dayList[1].day);
891 ASSERT_EQ(2, monthView.weekList[0].dayList[1].month);
892 ASSERT_EQ(2100, monthView.weekList[0].dayList[1].year);
893 ASSERT_EQ(true, monthView.weekList[0].dayList[1].isInMonth);
895 ASSERT_EQ(3, monthView.weekList[0].dayList[2].day);
896 ASSERT_EQ(2, monthView.weekList[0].dayList[2].month);
897 ASSERT_EQ(2100, monthView.weekList[0].dayList[2].year);
898 ASSERT_EQ(true, monthView.weekList[0].dayList[2].isInMonth);
900 ASSERT_EQ(4, monthView.weekList[0].dayList[3].day);
901 ASSERT_EQ(2, monthView.weekList[0].dayList[3].month);
902 ASSERT_EQ(2100, monthView.weekList[0].dayList[3].year);
903 ASSERT_EQ(true, monthView.weekList[0].dayList[3].isInMonth);
905 ASSERT_EQ(5, monthView.weekList[0].dayList[4].day);
906 ASSERT_EQ(2, monthView.weekList[0].dayList[4].month);
907 ASSERT_EQ(2100, monthView.weekList[0].dayList[4].year);
908 ASSERT_EQ(true, monthView.weekList[0].dayList[4].isInMonth);
910 ASSERT_EQ(6, monthView.weekList[0].dayList[5].day);
911 ASSERT_EQ(2, monthView.weekList[0].dayList[5].month);
912 ASSERT_EQ(2100, monthView.weekList[0].dayList[5].year);
913 ASSERT_EQ(true, monthView.weekList[0].dayList[5].isInMonth);
915 ASSERT_EQ(7, monthView.weekList[0].dayList[6].day);
916 ASSERT_EQ(2, monthView.weekList[0].dayList[6].month);
917 ASSERT_EQ(2100, monthView.weekList[0].dayList[6].year);
918 ASSERT_EQ(true, monthView.weekList[0].dayList[6].isInMonth);
922 ASSERT_EQ(8, monthView.weekList[1].dayList[0].day);
923 ASSERT_EQ(2, monthView.weekList[1].dayList[0].month);
924 ASSERT_EQ(2100, monthView.weekList[1].dayList[0].year);
925 ASSERT_EQ(true, monthView.weekList[1].dayList[0].isInMonth);
927 ASSERT_EQ(9, monthView.weekList[1].dayList[1].day);
928 ASSERT_EQ(2, monthView.weekList[1].dayList[1].month);
929 ASSERT_EQ(2100, monthView.weekList[1].dayList[1].year);
930 ASSERT_EQ(true, monthView.weekList[1].dayList[1].isInMonth);
932 ASSERT_EQ(10, monthView.weekList[1].dayList[2].day);
933 ASSERT_EQ(2, monthView.weekList[1].dayList[2].month);
934 ASSERT_EQ(2100, monthView.weekList[1].dayList[2].year);
935 ASSERT_EQ(true, monthView.weekList[1].dayList[2].isInMonth);
937 ASSERT_EQ(11, monthView.weekList[1].dayList[3].day);
938 ASSERT_EQ(2, monthView.weekList[1].dayList[3].month);
939 ASSERT_EQ(2100, monthView.weekList[1].dayList[3].year);
940 ASSERT_EQ(true, monthView.weekList[1].dayList[3].isInMonth);
942 ASSERT_EQ(12, monthView.weekList[1].dayList[4].day);
943 ASSERT_EQ(2, monthView.weekList[1].dayList[4].month);
944 ASSERT_EQ(2100, monthView.weekList[1].dayList[4].year);
945 ASSERT_EQ(true, monthView.weekList[1].dayList[4].isInMonth);
947 ASSERT_EQ(13, monthView.weekList[1].dayList[5].day);
948 ASSERT_EQ(2, monthView.weekList[1].dayList[5].month);
949 ASSERT_EQ(2100, monthView.weekList[1].dayList[5].year);
950 ASSERT_EQ(true, monthView.weekList[1].dayList[5].isInMonth);
952 ASSERT_EQ(14, monthView.weekList[1].dayList[6].day);
953 ASSERT_EQ(2, monthView.weekList[1].dayList[6].month);
954 ASSERT_EQ(2100, monthView.weekList[1].dayList[6].year);
955 ASSERT_EQ(true, monthView.weekList[1].dayList[6].isInMonth);
959 ASSERT_EQ(15, monthView.weekList[2].dayList[0].day);
960 ASSERT_EQ(2, monthView.weekList[2].dayList[0].month);
961 ASSERT_EQ(2100, monthView.weekList[2].dayList[0].year);
962 ASSERT_EQ(true, monthView.weekList[2].dayList[0].isInMonth);
964 ASSERT_EQ(16, monthView.weekList[2].dayList[1].day);
965 ASSERT_EQ(2, monthView.weekList[2].dayList[1].month);
966 ASSERT_EQ(2100, monthView.weekList[2].dayList[1].year);
967 ASSERT_EQ(true, monthView.weekList[2].dayList[1].isInMonth);
969 ASSERT_EQ(17, monthView.weekList[2].dayList[2].day);
970 ASSERT_EQ(2, monthView.weekList[2].dayList[2].month);
971 ASSERT_EQ(2100, monthView.weekList[2].dayList[2].year);
972 ASSERT_EQ(true, monthView.weekList[2].dayList[2].isInMonth);
974 ASSERT_EQ(18, monthView.weekList[2].dayList[3].day);
975 ASSERT_EQ(2, monthView.weekList[2].dayList[3].month);
976 ASSERT_EQ(2100, monthView.weekList[2].dayList[3].year);
977 ASSERT_EQ(true, monthView.weekList[2].dayList[3].isInMonth);
979 ASSERT_EQ(19, monthView.weekList[2].dayList[4].day);
980 ASSERT_EQ(2, monthView.weekList[2].dayList[4].month);
981 ASSERT_EQ(2100, monthView.weekList[2].dayList[4].year);
982 ASSERT_EQ(true, monthView.weekList[2].dayList[4].isInMonth);
984 ASSERT_EQ(20, monthView.weekList[2].dayList[5].day);
985 ASSERT_EQ(2, monthView.weekList[2].dayList[5].month);
986 ASSERT_EQ(2100, monthView.weekList[2].dayList[5].year);
987 ASSERT_EQ(true, monthView.weekList[2].dayList[5].isInMonth);
989 ASSERT_EQ(21, monthView.weekList[2].dayList[6].day);
990 ASSERT_EQ(2, monthView.weekList[2].dayList[6].month);
991 ASSERT_EQ(2100, monthView.weekList[2].dayList[6].year);
992 ASSERT_EQ(true, monthView.weekList[2].dayList[6].isInMonth);
996 ASSERT_EQ(22, monthView.weekList[3].dayList[0].day);
997 ASSERT_EQ(2, monthView.weekList[3].dayList[0].month);
998 ASSERT_EQ(2100, monthView.weekList[3].dayList[0].year);
999 ASSERT_EQ(true, monthView.weekList[3].dayList[0].isInMonth);
1001 ASSERT_EQ(23, monthView.weekList[3].dayList[1].day);
1002 ASSERT_EQ(2, monthView.weekList[3].dayList[1].month);
1003 ASSERT_EQ(2100, monthView.weekList[3].dayList[1].year);
1004 ASSERT_EQ(true, monthView.weekList[3].dayList[1].isInMonth);
1006 ASSERT_EQ(24, monthView.weekList[3].dayList[2].day);
1007 ASSERT_EQ(2, monthView.weekList[3].dayList[2].month);
1008 ASSERT_EQ(2100, monthView.weekList[3].dayList[2].year);
1009 ASSERT_EQ(true, monthView.weekList[3].dayList[2].isInMonth);
1011 ASSERT_EQ(25, monthView.weekList[3].dayList[3].day);
1012 ASSERT_EQ(2, monthView.weekList[3].dayList[3].month);
1013 ASSERT_EQ(2100, monthView.weekList[3].dayList[3].year);
1014 ASSERT_EQ(true, monthView.weekList[3].dayList[3].isInMonth);
1016 ASSERT_EQ(26, monthView.weekList[3].dayList[4].day);
1017 ASSERT_EQ(2, monthView.weekList[3].dayList[4].month);
1018 ASSERT_EQ(2100, monthView.weekList[3].dayList[4].year);
1019 ASSERT_EQ(true, monthView.weekList[3].dayList[4].isInMonth);
1021 ASSERT_EQ(27, monthView.weekList[3].dayList[5].day);
1022 ASSERT_EQ(2, monthView.weekList[3].dayList[5].month);
1023 ASSERT_EQ(2100, monthView.weekList[3].dayList[5].year);
1024 ASSERT_EQ(true, monthView.weekList[3].dayList[5].isInMonth);
1026 ASSERT_EQ(28, monthView.weekList[3].dayList[6].day);
1027 ASSERT_EQ(2, monthView.weekList[3].dayList[6].month);
1028 ASSERT_EQ(2100, monthView.weekList[3].dayList[6].year);
1029 ASSERT_EQ(true, monthView.weekList[3].dayList[6].isInMonth);