1 // xestiacalendar_commonfunctions.h - Xestia Calendar Common Functions 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 "../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);