#!/bin/sh
+# Build the library first.
+
+g++ -ggdb --std=c++11 -c ../libraries/CalendarDataStorage/CalendarDataStorage.cpp \
+ -o ../libraries/CalendarDataStorage/CalendarDataStorage-test.o \
+ -lsqlite3
+ar rcs libCalendarDataStorage-test.a ../libraries/CalendarDataStorage/CalendarDataStorage-test.o
+
+echo "Building main unit test app..."
+
+# Build the unit testing application.
+
g++ `xml2-config --cflags --libs` -ggdb --std=c++11 -lcurl -lgtest -pthread \
xestiacalendar_test.cpp xestiacalendar_testcommon.cpp xestiacalendar_populate.cpp \
../objects/calendarevent/CalendarEvent.cpp \
../common/monthviewgen.cpp \
../objects/CalDAV/CalDAV.cpp \
../objects/CalDAV/CalDAV-XMLProcessing.cpp \
--DXESTIACAL_UNITTEST -o xestiacalendar_test
+-DXESTIACAL_UNITTEST -o xestiacalendar_test \
+-L. -lCalendarDataStorage-test -lsqlite3
#include "xestiacalendar_icalfreebusysave.h"
#include "xestiacalendar_icaltimezoneload.h"
#include "xestiacalendar_icaltimezonesave.h"
+#include "xestiacalendar_calendardatastorage.h"
#include "xestiacalendar_caldav.h"
enum MenuOpts {
TESTS_ICALSAVEFREEBUSY,
TESTS_ICALLOADTIMEZONE,
TESTS_ICALSAVETIMEZONE,
+ TESTS_CALENDARDATASTORAGE,
TESTS_CALDAV,
TESTS_COMMONFUNCTIONS,
TESTS_EXTRA,
std::cout << TESTS_ICALSAVEFREEBUSY << ". iCalendar FreeBusy Component Save" << std::endl;
std::cout << TESTS_ICALLOADTIMEZONE << ". iCalendar Timezone Component Load" << std::endl;
std::cout << TESTS_ICALSAVETIMEZONE << ". iCalendar Timezone Component Save" << std::endl;
+ std::cout << TESTS_CALENDARDATASTORAGE << ". Calendar Data Storage" << std::endl;
std::cout << TESTS_CALDAV << ". CalDAV Object" << std::endl;
std::cout << TESTS_COMMONFUNCTIONS << ". Common Functions" << std::endl;
std::cout << TESTS_EXTRA << ". Extra Functions Menu" << std::endl;
::testing::GTEST_FLAG(filter) = "iCalendarSaveTimezone*";
TestResult = RUN_ALL_TESTS();
break;
+ case TESTS_CALENDARDATASTORAGE:
+ printn("Running Calendar Data Storage tests...");
+ ::testing::GTEST_FLAG(filter) = "CalendarDataStorage*";
+ TestResult = RUN_ALL_TESTS();
+ break;
case TESTS_CALDAV:
printn("Running CalDAV tests...");
::testing::GTEST_FLAG(filter) = "CalDAV*";