equal
deleted
inserted
replaced
63 s += "bar"; |
63 s += "bar"; |
64 INVALID_PATH = s; |
64 INVALID_PATH = s; |
65 } |
65 } |
66 |
66 |
67 |
67 |
68 static abstract class Test { |
68 abstract static class Test { |
69 |
69 |
70 String name; |
70 String name; |
71 |
71 |
72 public Test(String name) { |
72 public Test(String name) { |
73 this.name = name; |
73 this.name = name; |
74 } |
74 } |
75 |
75 |
76 abstract public void run() throws IOException; |
76 public abstract void run() throws IOException; |
77 |
77 |
78 public void go() throws IOException { |
78 public void go() throws IOException { |
79 try { |
79 try { |
80 this.run(); |
80 this.run(); |
81 } catch (IOException x) { |
81 } catch (IOException x) { |
86 System.err.println("WARNING: No exception for " + name); |
86 System.err.println("WARNING: No exception for " + name); |
87 } |
87 } |
88 |
88 |
89 } |
89 } |
90 |
90 |
91 static abstract class ClosedFISTest extends Test { |
91 abstract static class ClosedFISTest extends Test { |
92 |
92 |
93 FileInputStream in; |
93 FileInputStream in; |
94 |
94 |
95 public ClosedFISTest(String name) { |
95 public ClosedFISTest(String name) { |
96 super("FileInputStream." + name); |
96 super("FileInputStream." + name); |
102 super.go(); |
102 super.go(); |
103 } |
103 } |
104 |
104 |
105 } |
105 } |
106 |
106 |
107 static abstract class ClosedFOSTest extends Test { |
107 abstract static class ClosedFOSTest extends Test { |
108 |
108 |
109 FileOutputStream out; |
109 FileOutputStream out; |
110 |
110 |
111 public ClosedFOSTest(String name) { |
111 public ClosedFOSTest(String name) { |
112 super("FileOutputStream." + name); |
112 super("FileOutputStream." + name); |
118 super.go(); |
118 super.go(); |
119 } |
119 } |
120 |
120 |
121 } |
121 } |
122 |
122 |
123 static abstract class ClosedRAFTest extends Test { |
123 abstract static class ClosedRAFTest extends Test { |
124 |
124 |
125 RandomAccessFile raf; |
125 RandomAccessFile raf; |
126 |
126 |
127 public ClosedRAFTest(String name) { |
127 public ClosedRAFTest(String name) { |
128 super("RandomAccessFile." + name); |
128 super("RandomAccessFile." + name); |
134 super.go(); |
134 super.go(); |
135 } |
135 } |
136 |
136 |
137 } |
137 } |
138 |
138 |
139 static abstract class ReadOnlyRAFTest extends Test { |
139 abstract static class ReadOnlyRAFTest extends Test { |
140 |
140 |
141 RandomAccessFile raf; |
141 RandomAccessFile raf; |
142 |
142 |
143 public ReadOnlyRAFTest(String name) { |
143 public ReadOnlyRAFTest(String name) { |
144 super("RandomAccessFile." + name); |
144 super("RandomAccessFile." + name); |