* .hgignore: Ignoring class files.
authorStefan Ring <stefan@complang.tuwien.ac.at>
Mon, 3 Mar 2008 21:10:14 +0000 (22:10 +0100)
committerStefan Ring <stefan@complang.tuwien.ac.at>
Mon, 3 Mar 2008 21:10:14 +0000 (22:10 +0100)
* tests/threads: New directory for thread tests.
* tests/threads/threadInterrupt.java: Moved.

--HG--
rename : tests/threadInterrupt.java => tests/threads/threadInterrupt.java

.hgignore
tests/threadInterrupt.java [deleted file]
tests/threads/threadInterrupt.java [new file with mode: 0644]

index 44e2528b90624840a0c87d4a626f2b34c76a4271..5f82c8d894f922dc10f71217f4911d4ce91a8c54 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -50,3 +50,4 @@ tests/regression/resolving/*.class
 tests/regression/resolving/classes1/*.class
 tests/regression/resolving/classes2/*.class
 tests/regression/resolving/classes3/*.class
+tests/threads/*.class
diff --git a/tests/threadInterrupt.java b/tests/threadInterrupt.java
deleted file mode 100644 (file)
index ef41083..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-public class threadInterrupt {
-       public static class firstthread implements Runnable {
-               private threadInterrupt s;
-
-               public firstthread(threadInterrupt s_) {
-                       s = s_;
-               }
-               public void run() {
-                       try {
-                               synchronized (s.o1) {
-                                       System.out.println("first thread!");
-                                       Thread.sleep(500);
-                                       System.out.println("interrupting");
-                                       s.t2.interrupt();
-                                       System.out.println("leaving");
-                               }
-                       } catch (Exception e) {
-                               e.printStackTrace();
-                       }
-               }
-       }
-
-       public static class secondthread implements Runnable {
-               private threadInterrupt s;
-
-               public secondthread(threadInterrupt s_) {
-                       s = s_;
-               }
-               public void run() {
-                       try {
-                               Thread.sleep(250);
-                               synchronized (s.o1) {
-                                       System.out.println("second thread!");
-                                       s.o1.wait();
-                               }
-                       } catch (Exception e) {
-                               e.printStackTrace();
-                       }
-               }
-       }
-
-       public Object o1 = new Object();
-       public Thread t1 = null;
-       public Thread t2 = null;
-
-       public static void main(String args[]) {
-               System.out.println("should exit with java.lang.InterruptedException");
-               threadInterrupt s = new threadInterrupt();
-               firstthread r1 = new firstthread(s);
-               secondthread r2 = new secondthread(s);
-
-               s.t1 = new Thread(r1, "a");
-               s.t2 = new Thread(r2, "b");
-               s.t1.start();
-               s.t2.start();
-       }
-}
-
-/*
- * These are local overrides for various environment variables in Emacs.
- * Please do not remove this and leave it at the end of the file, where
- * Emacs will automagically detect them.
- * ---------------------------------------------------------------------
- * Local variables:
- * mode: java
- * indent-tabs-mode: t
- * c-basic-offset: 4
- * tab-width: 4
- * End:
- * vim:noexpandtab:sw=4:ts=4:
- */
diff --git a/tests/threads/threadInterrupt.java b/tests/threads/threadInterrupt.java
new file mode 100644 (file)
index 0000000..ef41083
--- /dev/null
@@ -0,0 +1,71 @@
+public class threadInterrupt {
+       public static class firstthread implements Runnable {
+               private threadInterrupt s;
+
+               public firstthread(threadInterrupt s_) {
+                       s = s_;
+               }
+               public void run() {
+                       try {
+                               synchronized (s.o1) {
+                                       System.out.println("first thread!");
+                                       Thread.sleep(500);
+                                       System.out.println("interrupting");
+                                       s.t2.interrupt();
+                                       System.out.println("leaving");
+                               }
+                       } catch (Exception e) {
+                               e.printStackTrace();
+                       }
+               }
+       }
+
+       public static class secondthread implements Runnable {
+               private threadInterrupt s;
+
+               public secondthread(threadInterrupt s_) {
+                       s = s_;
+               }
+               public void run() {
+                       try {
+                               Thread.sleep(250);
+                               synchronized (s.o1) {
+                                       System.out.println("second thread!");
+                                       s.o1.wait();
+                               }
+                       } catch (Exception e) {
+                               e.printStackTrace();
+                       }
+               }
+       }
+
+       public Object o1 = new Object();
+       public Thread t1 = null;
+       public Thread t2 = null;
+
+       public static void main(String args[]) {
+               System.out.println("should exit with java.lang.InterruptedException");
+               threadInterrupt s = new threadInterrupt();
+               firstthread r1 = new firstthread(s);
+               secondthread r2 = new secondthread(s);
+
+               s.t1 = new Thread(r1, "a");
+               s.t2 = new Thread(r2, "b");
+               s.t1.start();
+               s.t2.start();
+       }
+}
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: java
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */