summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/test/DirTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'qtjava/javalib/test/DirTest.java')
-rw-r--r--qtjava/javalib/test/DirTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/qtjava/javalib/test/DirTest.java b/qtjava/javalib/test/DirTest.java
new file mode 100644
index 00000000..1a694ed0
--- /dev/null
+++ b/qtjava/javalib/test/DirTest.java
@@ -0,0 +1,30 @@
+//import org.kde.qt.QApplication;
+//import org.kde.qt.QDir;
+import org.kde.qt.*;
+
+public class DirTest {
+ public static void main(String[] args)
+ {
+ QApplication myapp = new QApplication(args);
+
+ QDir mydir = new QDir("/tmp");
+ if ( mydir.match(new String [] {"*.bmp", "*.h"}, "foobar.bmp") ) {
+ System.out.println("foobar matches");
+ }
+
+ if ( ! mydir.match(new String[] {"*.bmp", "*.h"}, "baz.cpp") ) {
+ System.out.println("baz doesn't match");
+ }
+
+ QFile myobj = new QFile();
+ Object mytest;
+ System.out.println("myobj: " + myobj.toString());
+ mytest = (QDir) Qt.dynamicCast("QDir", myobj);
+ System.out.println("mytest: " + mytest.toString());
+ return;
+ }
+
+ static {
+ qtjava.initialize();
+ }
+}