Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
unit-test: Refactor unit testing building/running/info collecting for build server
[xestiacalendar/.git] / source / tests / CommonFunctionsTests / CommonFunctionsTests.cpp
 #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"));
        
 }
 
-TEST(CommonFunctions, ProcessTextVectorsTests){
+TEST_F(CommonFunctionsTests, ProcessTextVectorsTests){
        
        // Setup the objects to be used for processing.
        
@@ -175,7 +188,7 @@ TEST(CommonFunctions, ProcessTextVectorsTests){
 
 }
 
-TEST(CommonFunctions, SplitValuesTests){
+TEST_F(CommonFunctionsTests, SplitValuesTests){
        
        map<string, string> textExample1TestResult;
        
@@ -187,7 +200,7 @@ TEST(CommonFunctions, SplitValuesTests){
        
 }
 
-TEST(CommonFunctions, SplitNameValueTests){
+TEST_F(CommonFunctionsTests, SplitNameValueTests){
        
        PropertyNameValue nameValueResult;
                
@@ -201,7 +214,7 @@ TEST(CommonFunctions, SplitNameValueTests){
        
 }
 
-TEST(CommonFunctions, HexToInt){
+TEST_F(CommonFunctionsTests, HexToInt){
        
        string value1 = "10";           // 16
        string value2 = "50";           // 80
@@ -262,7 +275,7 @@ TEST(CommonFunctions, HexToInt){
 
 }
 
-TEST(CommonFunctions, SplitPathFilename){
+TEST_F(CommonFunctionsTests, SplitPathFilename){
        
        // Setup the file split.
        
@@ -295,7 +308,7 @@ TEST(CommonFunctions, SplitPathFilename){
 
 }
 
-TEST(CommonFunctions, ColourStruct){
+TEST_F(CommonFunctionsTests, ColourStruct){
        
        Colour colour1;
        Colour colour2;
@@ -363,7 +376,7 @@ TEST(CommonFunctions, ColourStruct){
        ASSERT_EQ(32, colour8.alpha);
 }
 
-TEST(CommonFunctions, OutputText){
+TEST_F(CommonFunctionsTests, OutputText){
        
        string inputText1 = "This is an example text.";
        string outputText1 = "This is an example text.";
@@ -438,7 +451,7 @@ TEST(CommonFunctions, OutputText){
 
 }
 
-TEST(CommonFunctions, PreviousMonthNumberofDays){
+TEST_F(CommonFunctionsTests, PreviousMonthNumberofDays){
 
        // Test the year 2015 (does not have a leap year).
        
@@ -496,7 +509,7 @@ TEST(CommonFunctions, PreviousMonthNumberofDays){
        
 }
 
-TEST(CommonFunctions, monthViewGenerator){
+TEST_F(CommonFunctionsTests, monthViewGenerator){
        
        XCCalendarMonthViewGrid monthView = GenerateMonthGrid(6, 2016);
 
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy