summaryrefslogtreecommitdiffstats
path: root/dcop/tests/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dcop/tests/test.cpp')
-rw-r--r--dcop/tests/test.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/dcop/tests/test.cpp b/dcop/tests/test.cpp
new file mode 100644
index 000000000..025230547
--- /dev/null
+++ b/dcop/tests/test.cpp
@@ -0,0 +1,44 @@
+#include "test.h"
+#include <kapplication.h>
+#include <iostream>
+#include <dcopclient.h>
+#include <kcmdlineargs.h>
+
+
+
+Test::~Test()
+{
+}
+
+#include "definitions.generated"
+
+using namespace std;
+
+void batch()
+{
+ QTextStream output( fopen( "batch.returns", "w" ) , IO_WriteOnly );
+ Test* object = new Test;
+#include "batch.generated"
+}
+
+#ifdef Q_OS_WIN
+# define main kdemain
+#endif
+
+int main(int argc, char** argv)
+{
+ if ( argc > 1 ) {
+ batch();
+ return 0;
+ }
+ KCmdLineArgs::init( argc, argv, "TestApp", "Tests the dcop familly of tools + libraries", "1.0" ); // FIXME
+ KApplication app;
+ if(!app.dcopClient()->attach( ))
+ return 1;
+
+ app.dcopClient()->registerAs( "TestApp" );
+ new Test;
+ return app.exec();
+}
+
+