Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiacalendar
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit-test: Refactor unit testing building/running/info collecting for build server
[xestiacalendar/.git]
/
source
/
tests
/
CommonFunctionsTests
/
CommonFunctionsTests.cpp
diff --git
a/source/tests/xestiacalendar_commonfunctions.h
b/source/tests/CommonFunctionsTests/CommonFunctionsTests.cpp
similarity index 98%
rename from
source/tests/xestiacalendar_commonfunctions.h
rename to
source/tests/CommonFunctionsTests/CommonFunctionsTests.cpp
index
a106a58
..
2f24534
100644
(file)
--- a/
source/tests/xestiacalendar_commonfunctions.h
+++ b/
source/tests/CommonFunctionsTests/CommonFunctionsTests.cpp
@@
-20,15
+20,28
@@
#include "../common/text.h"
#include "../common/colour.h"
#include "../common/monthviewgen.h"
#include "../common/text.h"
#include "../common/colour.h"
#include "../common/monthviewgen.h"
-
-TEST(CommonFunctions, FileTests){
+#include <gtest/gtest.h>
+
+class CommonFunctionsTests : public ::testing::Test
+{
+private:
+ virtual void SetUp()
+ {
+ }
+
+ virtual void TearDown()
+ {
+ }
+};
+
+TEST_F(CommonFunctionsTests, FileTests){
ASSERT_EQ(false, FileExists("iCalendarEvent-Missing.vcf"));
ASSERT_EQ(true, FileExists("iCalendarEvent-InvalidPermissions.vcf"));
}
ASSERT_EQ(false, FileExists("iCalendarEvent-Missing.vcf"));
ASSERT_EQ(true, FileExists("iCalendarEvent-InvalidPermissions.vcf"));
}
-TEST
(CommonFunction
s, ProcessTextVectorsTests){
+TEST
_F(CommonFunctionsTest
s, ProcessTextVectorsTests){
// Setup the objects to be used for processing.
// Setup the objects to be used for processing.
@@
-175,7
+188,7
@@
TEST(CommonFunctions, ProcessTextVectorsTests){
}
}
-TEST
(CommonFunction
s, SplitValuesTests){
+TEST
_F(CommonFunctionsTest
s, SplitValuesTests){
map<string, string> textExample1TestResult;
map<string, string> textExample1TestResult;
@@
-187,7
+200,7
@@
TEST(CommonFunctions, SplitValuesTests){
}
}
-TEST
(CommonFunction
s, SplitNameValueTests){
+TEST
_F(CommonFunctionsTest
s, SplitNameValueTests){
PropertyNameValue nameValueResult;
PropertyNameValue nameValueResult;
@@
-201,7
+214,7
@@
TEST(CommonFunctions, SplitNameValueTests){
}
}
-TEST
(CommonFunction
s, HexToInt){
+TEST
_F(CommonFunctionsTest
s, HexToInt){
string value1 = "10"; // 16
string value2 = "50"; // 80
string value1 = "10"; // 16
string value2 = "50"; // 80
@@
-262,7
+275,7
@@
TEST(CommonFunctions, HexToInt){
}
}
-TEST
(CommonFunction
s, SplitPathFilename){
+TEST
_F(CommonFunctionsTest
s, SplitPathFilename){
// Setup the file split.
// Setup the file split.
@@
-295,7
+308,7
@@
TEST(CommonFunctions, SplitPathFilename){
}
}
-TEST
(CommonFunction
s, ColourStruct){
+TEST
_F(CommonFunctionsTest
s, ColourStruct){
Colour colour1;
Colour colour2;
Colour colour1;
Colour colour2;
@@
-363,7
+376,7
@@
TEST(CommonFunctions, ColourStruct){
ASSERT_EQ(32, colour8.alpha);
}
ASSERT_EQ(32, colour8.alpha);
}
-TEST
(CommonFunction
s, OutputText){
+TEST
_F(CommonFunctionsTest
s, OutputText){
string inputText1 = "This is an example text.";
string outputText1 = "This is an example text.";
string inputText1 = "This is an example text.";
string outputText1 = "This is an example text.";
@@
-438,7
+451,7
@@
TEST(CommonFunctions, OutputText){
}
}
-TEST
(CommonFunction
s, PreviousMonthNumberofDays){
+TEST
_F(CommonFunctionsTest
s, PreviousMonthNumberofDays){
// Test the year 2015 (does not have a leap year).
// Test the year 2015 (does not have a leap year).
@@
-496,7
+509,7
@@
TEST(CommonFunctions, PreviousMonthNumberofDays){
}
}
-TEST
(CommonFunction
s, monthViewGenerator){
+TEST
_F(CommonFunctionsTest
s, monthViewGenerator){
XCCalendarMonthViewGrid monthView = GenerateMonthGrid(6, 2016);
XCCalendarMonthViewGrid monthView = GenerateMonthGrid(6, 2016);
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy