1 package org.jacorb.test.idl; 2 3 22 23 import junit.framework.*; 24 import org.jacorb.test.common.*; 25 26 32 33 public class MiscFailureTest extends TestCase 34 { 35 private static String outdir = TestUtils.testHome() + "/src/generated"; 36 private static String idldir = TestUtils.testHome() + "/idl/compiler/fail/"; 37 38 public MiscFailureTest (String name) 39 { 40 super (name); 41 } 42 43 44 public static Test suite () 45 { 46 TestSuite suite = new TestSuite ("Misc Failure Tests"); 47 48 suite.addTest (new MiscFailureTest ("testMiscParseFail1")); 49 suite.addTest (new MiscFailureTest ("testMiscParseFail2")); 50 suite.addTest (new MiscFailureTest ("testMiscParseFail3")); 51 suite.addTest (new MiscFailureTest ("testMiscParseFail4")); 52 suite.addTest (new MiscFailureTest ("testMiscParseFail5")); 53 suite.addTest (new MiscFailureTest ("testMiscParseFail6")); 54 suite.addTest (new MiscFailureTest ("testMiscParseFail6")); 55 suite.addTest (new MiscFailureTest ("testMiscParseFail7")); 56 suite.addTest (new MiscFailureTest ("testMiscParseFail8")); 57 suite.addTest (new MiscFailureTest ("testMiscParseFail9")); 58 suite.addTest (new MiscFailureTest ("testMiscParseFail10")); 59 suite.addTest (new MiscFailureTest ("testMiscParseFail11")); 60 suite.addTest (new MiscFailureTest ("testMiscParseFail12")); 61 suite.addTest (new MiscFailureTest ("testMiscParseFail13")); 62 suite.addTest (new MiscFailureTest ("testMiscParseFail14")); 63 suite.addTest (new MiscFailureTest ("testMiscParseFail15")); 64 suite.addTest (new MiscFailureTest ("testMiscParseFail16")); 65 suite.addTest (new MiscFailureTest ("testMiscParseFail17")); 66 suite.addTest (new MiscFailureTest ("testMiscParseFail18")); 67 suite.addTest (new MiscFailureTest ("testMiscParseFail19")); 68 suite.addTest (new MiscFailureTest ("testMiscParseFail20")); 69 70 return suite; 71 } 72 73 74 public void testMiscParseFail1 () 75 { 76 String file[] = new String [3]; 77 file[0] = "-d"; 78 file[1] = outdir; 79 file[2] = idldir.concat("defined.idl"); 80 81 assertFalse( "Compiled defined.idl (for failure)", 82 org.jacorb.idl.parser.compileAndHandle(file) ); 83 84 } 85 86 87 public void testMiscParseFail2 () 88 { 89 String file[] = new String [3]; 90 file[0] = "-d"; 91 file[1] = outdir; 92 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badenum1.idl"; 93 assertTrue("Compiled badenum1.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 94 } 95 96 97 public void testMiscParseFail3 () 98 { 99 String file[] = new String [3]; 100 file[0] = "-d"; 101 file[1] = outdir; 102 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badex1.idl"; 103 assertTrue("Compiled badex1.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 104 } 105 106 107 public void testMiscParseFail4 () 108 { 109 String file[] = new String [3]; 110 file[0] = "-d"; 111 file[1] = outdir; 112 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badex2.idl"; 113 assertTrue("Compiled badex2.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 114 } 115 116 117 public void testMiscParseFail5 () 118 { 119 String file[] = new String [3]; 120 file[0] = "-d"; 121 file[1] = outdir; 122 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badintf1.idl"; 123 assertTrue("Compiled badintf1.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 124 } 125 126 127 public void testMiscParseFail6 () 128 { 129 String file[] = new String [3]; 130 file[0] = "-d"; 131 file[1] = outdir; 132 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badop1.idl"; 133 assertTrue("Compiled badop1.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 134 } 135 136 137 public void testMiscParseFail7 () 138 { 139 String file[] = new String [3]; 140 file[0] = "-d"; 141 file[1] = outdir; 142 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badop2.idl"; 143 assertTrue("Compiled badop2.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 144 } 145 146 147 public void testMiscParseFail8 () 148 { 149 String file[] = new String [3]; 150 file[0] = "-d"; 151 file[1] = outdir; 152 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badop3.idl"; 153 assertTrue("Compiled badop3.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 154 } 155 156 157 public void testMiscParseFail9 () 158 { 159 String file[] = new String [3]; 160 file[0] = "-d"; 161 file[1] = outdir; 162 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badop4.idl"; 163 assertTrue("Compiled badop4.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 164 } 165 166 167 public void testMiscParseFail10 () 168 { 169 String file[] = new String [3]; 170 file[0] = "-d"; 171 file[1] = outdir; 172 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badop5.idl"; 173 assertTrue("Compiled badop5.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 174 } 175 176 177 public void testMiscParseFail11 () 178 { 179 String file[] = new String [3]; 180 file[0] = "-d"; 181 file[1] = outdir; 182 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badop6.idl"; 183 assertTrue("Compiled badop6.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 184 } 185 186 187 public void testMiscParseFail12 () 188 { 189 String file[] = new String [3]; 190 file[0] = "-d"; 191 file[1] = outdir; 192 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badop7.idl"; 193 assertTrue("Compiled badop7.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 194 } 195 196 197 public void testMiscParseFail13 () 198 { 199 String file[] = new String [3]; 200 file[0] = "-d"; 201 file[1] = outdir; 202 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badop8.idl"; 203 assertTrue("Compiled badop8.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 204 } 205 206 207 public void testMiscParseFail14 () 208 { 209 String file[] = new String [3]; 210 file[0] = "-d"; 211 file[1] = outdir; 212 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badraises1.idl"; 213 assertTrue("Compiled badraises1.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 214 } 215 216 217 public void testMiscParseFail15 () 218 { 219 String file[] = new String [3]; 220 file[0] = "-d"; 221 file[1] = outdir; 222 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badstruct.idl"; 223 assertTrue("Compiled badstruct.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 224 } 225 226 227 public void testMiscParseFail16 () 228 { 229 String file[] = new String [3]; 230 file[0] = "-d"; 231 file[1] = outdir; 232 file[2] = TestUtils.testHome() + "/idl/compiler/fail/badstruct2.idl"; 233 assertTrue("Compiled badstruct2.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 234 } 235 236 237 public void testMiscParseFail17 () 238 { 239 String file[] = new String [3]; 240 file[0] = "-d"; 241 file[1] = outdir; 242 file[2] = TestUtils.testHome() + "/idl/compiler/fail/forwardUndefined.idl"; 243 assertTrue ("Compiled forward1.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 244 } 245 246 247 public void testMiscParseFail18 () 248 { 249 String file[] = new String [3]; 250 file[0] = "-d"; 251 file[1] = outdir; 252 file[2] = TestUtils.testHome() + "/idl/compiler/fail/interfaceInheritsFromStruct.idl"; 253 assertTrue ("Compiled inherit1.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 254 } 255 256 257 public void testMiscParseFail19 () 258 { 259 String file[] = new String [3]; 260 file[0] = "-d"; 261 file[1] = outdir; 262 file[2] = TestUtils.testHome() + "/idl/compiler/fail/interfaceInheritsFromUndefined.idl"; 263 assertTrue ("Compiled inherit2.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 264 } 265 266 public void testMiscParseFail20 () 267 { 268 String file[] = new String [3]; 269 file[0] = "-d"; 270 file[1] = outdir; 271 file[2] = TestUtils.testHome() + "/idl/compiler/succeed/Ping1.idl"; 272 assertTrue ("Compiled Ping1.idl (for failure)", org.jacorb.idl.parser.compileAndHandle(file)==false); 273 } 274 } 275 | Popular Tags |