summaryrefslogtreecommitdiffstats
path: root/libkdepim/tests
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/tests')
-rw-r--r--libkdepim/tests/Makefile.am11
-rw-r--r--libkdepim/tests/testkincidencechooser.cpp45
-rw-r--r--libkdepim/tests/testutf7encoder2.cpp6
3 files changed, 55 insertions, 7 deletions
diff --git a/libkdepim/tests/Makefile.am b/libkdepim/tests/Makefile.am
index 5adc2e1c4..2e0d081ba 100644
--- a/libkdepim/tests/Makefile.am
+++ b/libkdepim/tests/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_builddir)/libkdepim -I$(top_srcdir)/libemailfunctions $(all_includes)
+AM_CPPFLAGS = -I$(top_builddir)/libkdepim -I$(top_srcdir)/libkdepim -I$(top_srcdir)/libemailfunctions $(all_includes)
AM_LDFLAGS = $(all_libraries) $(KDE_RPATH)
LDADD = ../libkdepim.la $(LIB_KDECORE)
@@ -9,8 +9,10 @@ check_PROGRAMS = testwizard testaddresseelineedit \
test_kregexp \
testdateedit \
testlinklocator \
- testdistrlist
+ testkincidencechooser
+# disabled because of X dependency
+# testdistrlist
testwizard_SOURCES = testwizard.cpp myconfig.kcfgc
testaddresseelineedit_SOURCES = testaddresseelineedit.cpp
@@ -20,9 +22,10 @@ testutf7decoder_SOURCES = testutf7decoder.cpp
test_kregexp_SOURCES = test_kregexp.cpp
testdateedit_SOURCES = testdateedit.cpp
testlinklocator_SOURCES = testlinklocator.cpp
-testdistrlist_SOURCES = testdistrlist.cpp
+#testdistrlist_SOURCES = testdistrlist.cpp
+testkincidencechooser_SOURCES = testkincidencechooser.cpp
-TESTS = testdistrlist
+#TESTS = testdistrlist
METASOURCES = AUTO
diff --git a/libkdepim/tests/testkincidencechooser.cpp b/libkdepim/tests/testkincidencechooser.cpp
new file mode 100644
index 000000000..1204f8dc2
--- /dev/null
+++ b/libkdepim/tests/testkincidencechooser.cpp
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2009 Allen Winter <winter@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+
+#include <libkcal/event.h>
+using namespace KCal;
+
+#include "kincidencechooser.h"
+using namespace KPIM;
+
+int main( int argc, char **argv )
+{
+ KCmdLineArgs::init( argc, argv, "testkincidencechooser", 0,
+ "KIncidenceChooserTest", "1.0",
+ "kincidencechooser test app" );
+ KApplication app;
+ KIncidenceChooser *chooser = new KIncidenceChooser();
+
+ Event event;
+ event.setSummary( i18n( "Meeting" ) );
+ event.setDescription( i18n( "Discuss foo" ) );
+ chooser->setIncidence( &event, &event );
+ chooser->resize( 600, 600 );
+ chooser->show();
+ return app.exec();
+}
diff --git a/libkdepim/tests/testutf7encoder2.cpp b/libkdepim/tests/testutf7encoder2.cpp
index 57c195662..6d67bae0a 100644
--- a/libkdepim/tests/testutf7encoder2.cpp
+++ b/libkdepim/tests/testutf7encoder2.cpp
@@ -3,7 +3,7 @@
#include <tqtextstream.h>
#include <string.h>
#include <assert.h>
-#include <iostream.h>
+#include <iostream>
int main( int argc, char * argv[] ) {
if ( argc == 1 ) {
@@ -31,10 +31,10 @@ int main( int argc, char * argv[] ) {
len = 1;
cout << (enc->fromUnicode(TQString(buffer[i]),len)).data();
}
- cout << endl;
+ std::cout << std::endl;
#else
int len = buffer.length();
- cout << (enc->fromUnicode(buffer,len)).data() << endl;;
+ std::cout << (enc->fromUnicode(buffer,len)).data() << std::endl;;
#endif // CHAR_WISE
delete enc;
#endif // else USE_STREAM