// xestiacalendar_commonfunctions.h - Xestia Calendar Common Functions Unit Tests
//
// (c) 2016-2017 Xestia Software Development.
//
// This file is part of Xestia Calendar.
//
// Xestia Calendar is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by the
// Free Software Foundation, version 3 of the license.
//
// Xestia Calendar is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with Xestia Calendar. If not, see
#include "../common/file.h"
#include "../common/text.h"
#include "../common/colour.h"
#include "../common/monthviewgen.h"
TEST(CommonFunctions, FileTests){
ASSERT_EQ(false, FileExists("iCalendarEvent-Missing.vcf"));
ASSERT_EQ(true, FileExists("iCalendarEvent-InvalidPermissions.vcf"));
}
TEST(CommonFunctions, ProcessTextVectorsTests){
// Setup the objects to be used for processing.
vector textPropertiesExample1;
vector textValueExample1;
multimap textExample1TestResult;
textPropertiesExample1.push_back("ATTENDEE");
textValueExample1.push_back("Example Attendee 1");
textPropertiesExample1.push_back("ATTENDEE");
textValueExample1.push_back("Example Attendee 2");
textPropertiesExample1.push_back("ATTENDEE");
textValueExample1.push_back("Example Attendee 3");
textPropertiesExample1.push_back("CATEGORIES");
textValueExample1.push_back("CATEGORY 1");
textPropertiesExample1.push_back("CATEGORIES");
textValueExample1.push_back("CATEGORY 2");
textPropertiesExample1.push_back("CATEGORIES");
textValueExample1.push_back("CATEGORY 3");
textPropertiesExample1.push_back("COMMENT");
textValueExample1.push_back("This is the first comment.");
textPropertiesExample1.push_back("COMMENT");
textValueExample1.push_back("This is the second comment.");
textPropertiesExample1.push_back("COMMENT");
textValueExample1.push_back("This is the third comment.");
textPropertiesExample1.push_back("CONTACT;TEST=VALUE");
textValueExample1.push_back("First Contact");
textPropertiesExample1.push_back("CONTACT;LAZY=NOPE");
textValueExample1.push_back("Second Contact");
textPropertiesExample1.push_back("CONTACT;SETUP=NO");
textValueExample1.push_back("Third Contact");
textPropertiesExample1.push_back("RESOURCES;ROOM=YES");
textValueExample1.push_back("First Resource Widget");
textPropertiesExample1.push_back("RESOURCES;ROOM=NO");
textValueExample1.push_back("Second Resource Widget");
textPropertiesExample1.push_back("RESOURCES;ROOM=UNKNOWN");
textValueExample1.push_back("Third Resource Widget");
textPropertiesExample1.push_back("RELATED;RELATION=NO");
textValueExample1.push_back("First Relation");
textPropertiesExample1.push_back("RELATED;RELATION=YES");
textValueExample1.push_back("Second Relation");
textPropertiesExample1.push_back("RELATED;RELATION=MAYBE");
textValueExample1.push_back("Third Relation");
// Examples 1 & 2: ATTENDEE
textExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 1"));
textExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 2"));
textExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 3"));
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "ATTENDEE"));
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("ATTENDEE", "Example Attendee 1"));
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "ATTENDEE"));
// Examples 3 & 4: CATEGORIES
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 1"));
textExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 2"));
textExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 3"));
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "CATEGORIES"));
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("CATEGORIES", "CATEGORY 1"));
// Examples 5 & 6: COMMENT
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "CATEGORIES"));
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("COMMENT", "This is the first comment."));
textExample1TestResult.insert(make_pair("COMMENT", "This is the second comment."));
textExample1TestResult.insert(make_pair("COMMENT", "This is the third comment."));
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "COMMENT"));
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("COMMENT", "This is the first comment."));
// Examples 7 & 8: CONTACT;(properties)
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "COMMENT"));
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("CONTACT;TEST=VALUE", "First Contact"));
textExample1TestResult.insert(make_pair("CONTACT;LAZY=NOPE", "Second Contact"));
textExample1TestResult.insert(make_pair("CONTACT;SETUP=NO", "Third Contact"));
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "CONTACT"));
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("CONTACT;TEST=VALUE", "First Contact"));
// Examples 9 & 10: RESOURCES;(properties)
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "CONTACT"));
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("RESOURCES;ROOM=YES", "First Resource Widget"));
textExample1TestResult.insert(make_pair("RESOURCES;ROOM=NO", "Second Resource Widget"));
textExample1TestResult.insert(make_pair("RESOURCES;ROOM=UNKNOWN", "Third Resource Widget"));
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "RESOURCES"));
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("RESOURCES;ROOM=YES", "First Resource Widget"));
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "RESOURCES"));
// Examples 11 & 12: RELATED;(properties)
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("RELATED;RELATION=NO", "First Relation"));
textExample1TestResult.insert(make_pair("RELATED;RELATION=YES", "Second Relation"));
textExample1TestResult.insert(make_pair("RELATED;RELATION=MAYBE", "Third Relation"));
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, true, "RELATED"));
textExample1TestResult.clear();
textExample1TestResult.insert(make_pair("RELATED;RELATION=NO", "First Relation"));
ASSERT_EQ(textExample1TestResult, ProcessTextVectors(&textPropertiesExample1, &textValueExample1, false, "RELATED"));
}
TEST(CommonFunctions, SplitValuesTests){
map textExample1TestResult;
textExample1TestResult.insert(make_pair("RELATION", "NO"));
textExample1TestResult.insert(make_pair("TEST", "YES"));
textExample1TestResult.insert(make_pair("DATA", "SOMEDATA"));
ASSERT_EQ(textExample1TestResult, SplitValues("TEST;RELATION=NO;TEST=YES;DATA=SOMEDATA"));
}
TEST(CommonFunctions, SplitNameValueTests){
PropertyNameValue nameValueResult;
nameValueResult = SplitNameValue("TEST=OK");
string propertyName = nameValueResult.name;
string propertyValue = nameValueResult.value;
ASSERT_EQ(propertyName, "TEST");
ASSERT_EQ(propertyValue, "OK");
}
TEST(CommonFunctions, HexToInt){
string value1 = "10"; // 16
string value2 = "50"; // 80
string value3 = "4F"; // 79
string value4 = "FF"; // 255
string value5 = "FFF"; // 4095
string value6 = "FFFF"; // 65535
string value7 = "75AB"; // 30123
string value8 = "2AC"; // 684
string value9 = "!"; // Fail
string value10 = "4BZ"; // Fail
string value11 = "Z?!$"; // Fail
int outputValue = 0;
bool result = false;
result = HexToInt(&value1, &outputValue);
ASSERT_EQ(result, true);
ASSERT_EQ(outputValue, 16);
result = HexToInt(&value2, &outputValue);
ASSERT_EQ(result, true);
ASSERT_EQ(outputValue, 80);
result = HexToInt(&value3, &outputValue);
ASSERT_EQ(result, true);
ASSERT_EQ(outputValue, 79);
result = HexToInt(&value4, &outputValue);
ASSERT_EQ(result, true);
ASSERT_EQ(outputValue, 255);
result = HexToInt(&value5, &outputValue);
ASSERT_EQ(result, true);
ASSERT_EQ(outputValue, 4095);
result = HexToInt(&value6, &outputValue);
ASSERT_EQ(result, true);
ASSERT_EQ(outputValue, 65535);
result = HexToInt(&value7, &outputValue);
ASSERT_EQ(result, true);
ASSERT_EQ(outputValue, 30123);
result = HexToInt(&value8, &outputValue);
ASSERT_EQ(result, true);
ASSERT_EQ(outputValue, 684);
result = HexToInt(&value9, &outputValue);
ASSERT_EQ(result, false);
result = HexToInt(&value10, &outputValue);
ASSERT_EQ(result, false);
result = HexToInt(&value11, &outputValue);
ASSERT_EQ(result, false);
}
TEST(CommonFunctions, SplitPathFilename){
// Setup the file split.
string pathFilenameOriginal = "/example/file/yay.txt";
string path = "";
string file = "";
SplitPathFilename(&pathFilenameOriginal, &path, &file);
ASSERT_EQ("/example/file/", path);
ASSERT_EQ("yay.txt", file);
pathFilenameOriginal = "/a/path/with/lots/of/bits/in/andthenthis.html";
path.clear();
file.clear();
SplitPathFilename(&pathFilenameOriginal, &path, &file);
ASSERT_EQ("/a/path/with/lots/of/bits/in/", path);
ASSERT_EQ("andthenthis.html", file);
pathFilenameOriginal = "/one/more/for/a/laugh/hahaha.zip";
path.clear();
file.clear();
SplitPathFilename(&pathFilenameOriginal, &path, &file);
ASSERT_EQ("/one/more/for/a/laugh/", path);
ASSERT_EQ("hahaha.zip", file);
}
TEST(CommonFunctions, ColourStruct){
Colour colour1;
Colour colour2;
Colour colour3;
Colour colour4;
colour1.red = 0;
colour1.green = 0;
colour1.blue = 0;
colour1.alpha = 0;
colour2.red = 512;
colour2.green = 512;
colour2.blue = 512;
colour2.alpha = 512;
colour3.red = 16;
colour3.green = 16;
colour3.blue = 16;
colour3.alpha = 16;
colour4.red = 80;
colour4.green = 80;
colour4.blue = 80;
colour4.alpha = 80;
ASSERT_EQ("#00000000", (string)colour1);
ASSERT_EQ("#FFFFFFFF", (string)colour2);
ASSERT_EQ("#10101010", (string)colour3);
ASSERT_EQ("#50505050", (string)colour4);
string colourInput1 = "#204040FF";
string colourInput2 = "#408080FF";
string colourInput3 = "#A0A0A000";
string colourInput4 = "#FFFFFF20";
Colour colour5;
Colour colour6;
Colour colour7;
Colour colour8;
colour5 = colourInput1;
colour6 = colourInput2;
colour7 = colourInput3;
colour8 = colourInput4;
ASSERT_EQ(32, colour5.red);
ASSERT_EQ(64, colour5.green);
ASSERT_EQ(64, colour5.blue);
ASSERT_EQ(255, colour5.alpha);
ASSERT_EQ(64, colour6.red);
ASSERT_EQ(128, colour6.green);
ASSERT_EQ(128, colour6.blue);
ASSERT_EQ(255, colour6.alpha);
ASSERT_EQ(160, colour7.red);
ASSERT_EQ(160, colour7.green);
ASSERT_EQ(160, colour7.blue);
ASSERT_EQ(0, colour7.alpha);
ASSERT_EQ(255, colour8.red);
ASSERT_EQ(255, colour8.green);
ASSERT_EQ(255, colour8.blue);
ASSERT_EQ(32, colour8.alpha);
}
TEST(CommonFunctions, OutputText){
string inputText1 = "This is an example text.";
string outputText1 = "This is an example text.";
string resultText1 = "";
string inputText2 = "This is the first sentence. This is the second sentence"
". This is the third sentence. This is the fourth sentence. This "
"is the fifth sentence.";
string outputText2 = "This is the first sentence. This is the second sentence"
". This is the third se\n ntence. This is the fourth sentence. This "
"is the fifth sentence.";
string resultText2 = "";
string inputText3 = "This is the first sentence. This is the second sentence"
". This is the third sentence. This is the fourth sentence. This "
"is the fifth sentence. This is the sixth sentence. This is the s"
"eventh sentence. This is the eighth sentence. This is the ninth "
"sentence. This is the tenth sentence.";
string outputText3 = "This is the first sentence. This is the second sentence. This is the third se\n"
" ntence. This is the fourth sentence. This is the fifth sentence. This is the\n"
" sixth sentence. This is the seventh sentence. This is the eighth sentence. \n"
" This is the ninth sentence. This is the tenth sentence.";
string resultText3 = "";
string inputText4 = "This is the first sentence. This is the second sentence"
". This is the third sentence. This is the fourth sentence. This "
"is the fifth sentence. This is the sixth sentence. This is the s"
"eventh sentence. This is the eighth sentence. This is the ninth "
"sentence. This is the tenth sentence. This is the eleventh sente"
"nce. This is the twelfth sentence. This is the thirteenth senten"
"ce. This is the fourteenth sentence. This is the fifteenth sente"
"nce.";
string outputText4 = "This is the first sentence. This is the second sentence. This is the third se\n"
" ntence. This is the fourth sentence. This is the fifth sentence. This is the\n"
" sixth sentence. This is the seventh sentence. This is the eighth sentence. \n"
" This is the ninth sentence. This is the tenth sentence. This is the eleventh\n"
" sentence. This is the twelfth sentence. This is the thirteenth sentence. Th\n"
" is is the fourteenth sentence. This is the fifteenth sentence.";
string resultText4 = "";
string inputText5 = "This is the first sentence. This is the second sentence"
". This is the third sentence. This is the fourth sentence. This "
"is the fifth sentence. This is the sixth sentence. This is the s"
"eventh sentence. This is the eighth sentence. This is the ninth "
"sentence. This is the tenth sentence. This is the eleventh sente"
"nce. This is the twelfth sentence. This is the thirteenth senten"
"ce. This is the fourteenth sentence. This is the fifteenth sente"
"nce. This is the sixteenth sentence. This is the seventeenth sen"
"tence. This is the eighteenth sentence. This is the ninteenth se"
"ntence. This is the twentieth sentence.";
string outputText5 = "This is the first sentence. This is the second sentence. This is the third se\n"
" ntence. This is the fourth sentence. This is the fifth sentence. This is the\n"
" sixth sentence. This is the seventh sentence. This is the eighth sentence. \n"
" This is the ninth sentence. This is the tenth sentence. This is the eleventh\n"
" sentence. This is the twelfth sentence. This is the thirteenth sentence. Th\n"
" is is the fourteenth sentence. This is the fifteenth sentence. This is the s\n"
" ixteenth sentence. This is the seventeenth sentence. This is the eighteenth \n"
" sentence. This is the ninteenth sentence. This is the twentieth sentence.";
string resultText5;
resultText1 = OutputText(&inputText1);
resultText2 = OutputText(&inputText2);
resultText3 = OutputText(&inputText3);
resultText4 = OutputText(&inputText4);
resultText5 = OutputText(&inputText5);
ASSERT_EQ(resultText1, outputText1);
ASSERT_EQ(resultText2, outputText2);
ASSERT_EQ(resultText3, outputText3);
ASSERT_EQ(resultText4, outputText4);
ASSERT_EQ(resultText5, outputText5);
}
TEST(CommonFunctions, PreviousMonthNumberofDays){
// Test the year 2015 (does not have a leap year).
ASSERT_EQ(30, PreviousMonthNumberofDays(12, 2015));
// Test the year 2016 (has a leap year).
ASSERT_EQ(31, PreviousMonthNumberofDays(1, 2016));
ASSERT_EQ(31, PreviousMonthNumberofDays(2, 2016));
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2016));
ASSERT_EQ(31, PreviousMonthNumberofDays(4, 2016));
ASSERT_EQ(30, PreviousMonthNumberofDays(5, 2016));
ASSERT_EQ(31, PreviousMonthNumberofDays(6, 2016));
ASSERT_EQ(30, PreviousMonthNumberofDays(7, 2016));
ASSERT_EQ(31, PreviousMonthNumberofDays(8, 2016));
ASSERT_EQ(31, PreviousMonthNumberofDays(9, 2016));
ASSERT_EQ(30, PreviousMonthNumberofDays(10, 2016));
ASSERT_EQ(31, PreviousMonthNumberofDays(11, 2016));
ASSERT_EQ(30, PreviousMonthNumberofDays(12, 2016));
ASSERT_EQ(31, PreviousMonthNumberofDays(1, 2017));
// Test the leap year section.
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2016));
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2012));
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2008));
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2004));
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2000));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2015));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2014));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2013));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2041));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2042));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2043));
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2044));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2045));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2046));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2047));
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2048));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2049));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2050));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 1900));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2200));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2300));
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2400));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2500));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2600));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2700));
ASSERT_EQ(29, PreviousMonthNumberofDays(3, 2800));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 2900));
ASSERT_EQ(28, PreviousMonthNumberofDays(3, 3000));
}
TEST(CommonFunctions, monthViewGenerator){
XCCalendarMonthViewGrid monthView = GenerateMonthGrid(6, 2016);
// First week.
ASSERT_EQ(30, monthView.weekList[0].dayList[0].day);
ASSERT_EQ(5, monthView.weekList[0].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[0].year);
ASSERT_EQ(false, monthView.weekList[0].dayList[0].isInMonth);
ASSERT_EQ(31, monthView.weekList[0].dayList[1].day);
ASSERT_EQ(5, monthView.weekList[0].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[1].year);
ASSERT_EQ(false, monthView.weekList[0].dayList[1].isInMonth);
ASSERT_EQ(1, monthView.weekList[0].dayList[2].day);
ASSERT_EQ(6, monthView.weekList[0].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[2].isInMonth);
ASSERT_EQ(2, monthView.weekList[0].dayList[3].day);
ASSERT_EQ(6, monthView.weekList[0].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[3].isInMonth);
ASSERT_EQ(3, monthView.weekList[0].dayList[4].day);
ASSERT_EQ(6, monthView.weekList[0].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[4].isInMonth);
ASSERT_EQ(4, monthView.weekList[0].dayList[5].day);
ASSERT_EQ(6, monthView.weekList[0].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[5].isInMonth);
ASSERT_EQ(5, monthView.weekList[0].dayList[6].day);
ASSERT_EQ(6, monthView.weekList[0].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[6].isInMonth);
// Second week.
ASSERT_EQ(6, monthView.weekList[1].dayList[0].day);
ASSERT_EQ(6, monthView.weekList[1].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[0].isInMonth);
ASSERT_EQ(7, monthView.weekList[1].dayList[1].day);
ASSERT_EQ(6, monthView.weekList[1].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[1].isInMonth);
ASSERT_EQ(8, monthView.weekList[1].dayList[2].day);
ASSERT_EQ(6, monthView.weekList[1].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[2].isInMonth);
ASSERT_EQ(9, monthView.weekList[1].dayList[3].day);
ASSERT_EQ(6, monthView.weekList[1].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[3].isInMonth);
ASSERT_EQ(10, monthView.weekList[1].dayList[4].day);
ASSERT_EQ(6, monthView.weekList[1].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[4].isInMonth);
ASSERT_EQ(11, monthView.weekList[1].dayList[5].day);
ASSERT_EQ(6, monthView.weekList[1].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[5].isInMonth);
ASSERT_EQ(12, monthView.weekList[1].dayList[6].day);
ASSERT_EQ(6, monthView.weekList[1].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[6].isInMonth);
// Third Week.
ASSERT_EQ(13, monthView.weekList[2].dayList[0].day);
ASSERT_EQ(6, monthView.weekList[2].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[0].isInMonth);
ASSERT_EQ(14, monthView.weekList[2].dayList[1].day);
ASSERT_EQ(6, monthView.weekList[2].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[1].isInMonth);
ASSERT_EQ(15, monthView.weekList[2].dayList[2].day);
ASSERT_EQ(6, monthView.weekList[2].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[2].isInMonth);
ASSERT_EQ(16, monthView.weekList[2].dayList[3].day);
ASSERT_EQ(6, monthView.weekList[2].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[3].isInMonth);
ASSERT_EQ(17, monthView.weekList[2].dayList[4].day);
ASSERT_EQ(6, monthView.weekList[2].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[4].isInMonth);
ASSERT_EQ(18, monthView.weekList[2].dayList[5].day);
ASSERT_EQ(6, monthView.weekList[2].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[5].isInMonth);
ASSERT_EQ(19, monthView.weekList[2].dayList[6].day);
ASSERT_EQ(6, monthView.weekList[2].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[6].isInMonth);
// Fourth week.
ASSERT_EQ(20, monthView.weekList[3].dayList[0].day);
ASSERT_EQ(6, monthView.weekList[3].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[0].isInMonth);
ASSERT_EQ(21, monthView.weekList[3].dayList[1].day);
ASSERT_EQ(6, monthView.weekList[3].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[1].isInMonth);
ASSERT_EQ(22, monthView.weekList[3].dayList[2].day);
ASSERT_EQ(6, monthView.weekList[3].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[2].isInMonth);
ASSERT_EQ(23, monthView.weekList[3].dayList[3].day);
ASSERT_EQ(6, monthView.weekList[3].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[3].isInMonth);
ASSERT_EQ(24, monthView.weekList[3].dayList[4].day);
ASSERT_EQ(6, monthView.weekList[3].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[4].isInMonth);
ASSERT_EQ(25, monthView.weekList[3].dayList[5].day);
ASSERT_EQ(6, monthView.weekList[3].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[5].isInMonth);
ASSERT_EQ(26, monthView.weekList[3].dayList[6].day);
ASSERT_EQ(6, monthView.weekList[3].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[6].isInMonth);
// Fifth week.
ASSERT_EQ(27, monthView.weekList[4].dayList[0].day);
ASSERT_EQ(6, monthView.weekList[4].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[4].dayList[0].isInMonth);
ASSERT_EQ(28, monthView.weekList[4].dayList[1].day);
ASSERT_EQ(6, monthView.weekList[4].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[4].dayList[1].isInMonth);
ASSERT_EQ(29, monthView.weekList[4].dayList[2].day);
ASSERT_EQ(6, monthView.weekList[4].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[4].dayList[2].isInMonth);
ASSERT_EQ(30, monthView.weekList[4].dayList[3].day);
ASSERT_EQ(6, monthView.weekList[4].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[4].dayList[3].isInMonth);
ASSERT_EQ(1, monthView.weekList[4].dayList[4].day);
ASSERT_EQ(7, monthView.weekList[4].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[4].year);
ASSERT_EQ(false, monthView.weekList[4].dayList[4].isInMonth);
ASSERT_EQ(2, monthView.weekList[4].dayList[5].day);
ASSERT_EQ(7, monthView.weekList[4].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[5].year);
ASSERT_EQ(false, monthView.weekList[4].dayList[5].isInMonth);
ASSERT_EQ(3, monthView.weekList[4].dayList[6].day);
ASSERT_EQ(7, monthView.weekList[4].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[6].year);
ASSERT_EQ(false, monthView.weekList[4].dayList[6].isInMonth);
// Test February 2016 (leap year).
monthView = GenerateMonthGrid(2, 2016);
// First week.
ASSERT_EQ(1, monthView.weekList[0].dayList[0].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[0].isInMonth);
ASSERT_EQ(2, monthView.weekList[0].dayList[1].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[1].isInMonth);
ASSERT_EQ(3, monthView.weekList[0].dayList[2].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[2].isInMonth);
ASSERT_EQ(4, monthView.weekList[0].dayList[3].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[3].isInMonth);
ASSERT_EQ(5, monthView.weekList[0].dayList[4].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[4].isInMonth);
ASSERT_EQ(6, monthView.weekList[0].dayList[5].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[5].isInMonth);
ASSERT_EQ(7, monthView.weekList[0].dayList[6].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[0].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[6].isInMonth);
// Second week.
ASSERT_EQ(8, monthView.weekList[1].dayList[0].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[0].isInMonth);
ASSERT_EQ(9, monthView.weekList[1].dayList[1].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[1].isInMonth);
ASSERT_EQ(10, monthView.weekList[1].dayList[2].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[2].isInMonth);
ASSERT_EQ(11, monthView.weekList[1].dayList[3].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[3].isInMonth);
ASSERT_EQ(12, monthView.weekList[1].dayList[4].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[4].isInMonth);
ASSERT_EQ(13, monthView.weekList[1].dayList[5].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[5].isInMonth);
ASSERT_EQ(14, monthView.weekList[1].dayList[6].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[1].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[6].isInMonth);
// Third Week.
ASSERT_EQ(15, monthView.weekList[2].dayList[0].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[0].isInMonth);
ASSERT_EQ(16, monthView.weekList[2].dayList[1].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[1].isInMonth);
ASSERT_EQ(17, monthView.weekList[2].dayList[2].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[2].isInMonth);
ASSERT_EQ(18, monthView.weekList[2].dayList[3].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[3].isInMonth);
ASSERT_EQ(19, monthView.weekList[2].dayList[4].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[4].isInMonth);
ASSERT_EQ(20, monthView.weekList[2].dayList[5].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[5].isInMonth);
ASSERT_EQ(21, monthView.weekList[2].dayList[6].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[2].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[6].isInMonth);
// Fourth week.
ASSERT_EQ(22, monthView.weekList[3].dayList[0].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[0].isInMonth);
ASSERT_EQ(23, monthView.weekList[3].dayList[1].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[1].isInMonth);
ASSERT_EQ(24, monthView.weekList[3].dayList[2].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[2].isInMonth);
ASSERT_EQ(25, monthView.weekList[3].dayList[3].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[3].isInMonth);
ASSERT_EQ(26, monthView.weekList[3].dayList[4].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[4].isInMonth);
ASSERT_EQ(27, monthView.weekList[3].dayList[5].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[5].isInMonth);
ASSERT_EQ(28, monthView.weekList[3].dayList[6].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[3].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[6].isInMonth);
// Fifth week.
ASSERT_EQ(29, monthView.weekList[4].dayList[0].day);
ASSERT_EQ(2, monthView.weekList[4].dayList[0].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[4].dayList[0].isInMonth);
ASSERT_EQ(1, monthView.weekList[4].dayList[1].day);
ASSERT_EQ(3, monthView.weekList[4].dayList[1].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[1].year);
ASSERT_EQ(false, monthView.weekList[4].dayList[1].isInMonth);
ASSERT_EQ(2, monthView.weekList[4].dayList[2].day);
ASSERT_EQ(3, monthView.weekList[4].dayList[2].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[2].year);
ASSERT_EQ(false, monthView.weekList[4].dayList[2].isInMonth);
ASSERT_EQ(3, monthView.weekList[4].dayList[3].day);
ASSERT_EQ(3, monthView.weekList[4].dayList[3].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[3].year);
ASSERT_EQ(false, monthView.weekList[4].dayList[3].isInMonth);
ASSERT_EQ(4, monthView.weekList[4].dayList[4].day);
ASSERT_EQ(3, monthView.weekList[4].dayList[4].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[4].year);
ASSERT_EQ(false, monthView.weekList[4].dayList[4].isInMonth);
ASSERT_EQ(5, monthView.weekList[4].dayList[5].day);
ASSERT_EQ(3, monthView.weekList[4].dayList[5].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[5].year);
ASSERT_EQ(false, monthView.weekList[4].dayList[5].isInMonth);
ASSERT_EQ(6, monthView.weekList[4].dayList[6].day);
ASSERT_EQ(3, monthView.weekList[4].dayList[6].month);
ASSERT_EQ(2016, monthView.weekList[4].dayList[6].year);
ASSERT_EQ(false, monthView.weekList[4].dayList[6].isInMonth);
// Generate a month grid for February 2100 (not a leap year).
monthView = GenerateMonthGrid(2, 2100);
// First week.
ASSERT_EQ(4, monthView.weekList.size());
ASSERT_EQ(1, monthView.weekList[0].dayList[0].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[0].month);
ASSERT_EQ(2100, monthView.weekList[0].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[0].isInMonth);
ASSERT_EQ(2, monthView.weekList[0].dayList[1].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[1].month);
ASSERT_EQ(2100, monthView.weekList[0].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[1].isInMonth);
ASSERT_EQ(3, monthView.weekList[0].dayList[2].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[2].month);
ASSERT_EQ(2100, monthView.weekList[0].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[2].isInMonth);
ASSERT_EQ(4, monthView.weekList[0].dayList[3].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[3].month);
ASSERT_EQ(2100, monthView.weekList[0].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[3].isInMonth);
ASSERT_EQ(5, monthView.weekList[0].dayList[4].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[4].month);
ASSERT_EQ(2100, monthView.weekList[0].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[4].isInMonth);
ASSERT_EQ(6, monthView.weekList[0].dayList[5].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[5].month);
ASSERT_EQ(2100, monthView.weekList[0].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[5].isInMonth);
ASSERT_EQ(7, monthView.weekList[0].dayList[6].day);
ASSERT_EQ(2, monthView.weekList[0].dayList[6].month);
ASSERT_EQ(2100, monthView.weekList[0].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[0].dayList[6].isInMonth);
// Second week.
ASSERT_EQ(8, monthView.weekList[1].dayList[0].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[0].month);
ASSERT_EQ(2100, monthView.weekList[1].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[0].isInMonth);
ASSERT_EQ(9, monthView.weekList[1].dayList[1].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[1].month);
ASSERT_EQ(2100, monthView.weekList[1].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[1].isInMonth);
ASSERT_EQ(10, monthView.weekList[1].dayList[2].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[2].month);
ASSERT_EQ(2100, monthView.weekList[1].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[2].isInMonth);
ASSERT_EQ(11, monthView.weekList[1].dayList[3].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[3].month);
ASSERT_EQ(2100, monthView.weekList[1].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[3].isInMonth);
ASSERT_EQ(12, monthView.weekList[1].dayList[4].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[4].month);
ASSERT_EQ(2100, monthView.weekList[1].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[4].isInMonth);
ASSERT_EQ(13, monthView.weekList[1].dayList[5].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[5].month);
ASSERT_EQ(2100, monthView.weekList[1].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[5].isInMonth);
ASSERT_EQ(14, monthView.weekList[1].dayList[6].day);
ASSERT_EQ(2, monthView.weekList[1].dayList[6].month);
ASSERT_EQ(2100, monthView.weekList[1].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[1].dayList[6].isInMonth);
// Third Week.
ASSERT_EQ(15, monthView.weekList[2].dayList[0].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[0].month);
ASSERT_EQ(2100, monthView.weekList[2].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[0].isInMonth);
ASSERT_EQ(16, monthView.weekList[2].dayList[1].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[1].month);
ASSERT_EQ(2100, monthView.weekList[2].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[1].isInMonth);
ASSERT_EQ(17, monthView.weekList[2].dayList[2].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[2].month);
ASSERT_EQ(2100, monthView.weekList[2].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[2].isInMonth);
ASSERT_EQ(18, monthView.weekList[2].dayList[3].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[3].month);
ASSERT_EQ(2100, monthView.weekList[2].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[3].isInMonth);
ASSERT_EQ(19, monthView.weekList[2].dayList[4].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[4].month);
ASSERT_EQ(2100, monthView.weekList[2].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[4].isInMonth);
ASSERT_EQ(20, monthView.weekList[2].dayList[5].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[5].month);
ASSERT_EQ(2100, monthView.weekList[2].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[5].isInMonth);
ASSERT_EQ(21, monthView.weekList[2].dayList[6].day);
ASSERT_EQ(2, monthView.weekList[2].dayList[6].month);
ASSERT_EQ(2100, monthView.weekList[2].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[2].dayList[6].isInMonth);
// Fourth week.
ASSERT_EQ(22, monthView.weekList[3].dayList[0].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[0].month);
ASSERT_EQ(2100, monthView.weekList[3].dayList[0].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[0].isInMonth);
ASSERT_EQ(23, monthView.weekList[3].dayList[1].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[1].month);
ASSERT_EQ(2100, monthView.weekList[3].dayList[1].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[1].isInMonth);
ASSERT_EQ(24, monthView.weekList[3].dayList[2].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[2].month);
ASSERT_EQ(2100, monthView.weekList[3].dayList[2].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[2].isInMonth);
ASSERT_EQ(25, monthView.weekList[3].dayList[3].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[3].month);
ASSERT_EQ(2100, monthView.weekList[3].dayList[3].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[3].isInMonth);
ASSERT_EQ(26, monthView.weekList[3].dayList[4].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[4].month);
ASSERT_EQ(2100, monthView.weekList[3].dayList[4].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[4].isInMonth);
ASSERT_EQ(27, monthView.weekList[3].dayList[5].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[5].month);
ASSERT_EQ(2100, monthView.weekList[3].dayList[5].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[5].isInMonth);
ASSERT_EQ(28, monthView.weekList[3].dayList[6].day);
ASSERT_EQ(2, monthView.weekList[3].dayList[6].month);
ASSERT_EQ(2100, monthView.weekList[3].dayList[6].year);
ASSERT_EQ(true, monthView.weekList[3].dayList[6].isInMonth);
}