KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > test > idl > MiscTest


1 package org.jacorb.test.idl;
2
3 /*
4  * JacORB - a free Java ORB
5  *
6  * Copyright (C) 1997-2001 Gerald Brose.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free
20  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */

22
23 import junit.framework.*;
24 import org.jacorb.test.common.*;
25
26 /**
27  * MiscTest.java
28  *
29  * Various IDL moved from test directory.
30  *
31  */

32
33 public class MiscTest extends TestCase
34 {
35     public MiscTest (String JavaDoc name)
36     {
37         super (name);
38     }
39
40
41     public static Test suite ()
42     {
43         TestSuite suite = new TestSuite ("Misc Tests");
44
45         suite.addTest (new MiscTest ("testMiscParseGood1"));
46         suite.addTest (new MiscTest ("testMiscParseGood2"));
47         suite.addTest (new MiscTest ("testMiscParseGood3"));
48         suite.addTest (new MiscTest ("testMiscParseGood4"));
49         suite.addTest (new MiscTest ("testMiscParseGood5"));
50         suite.addTest (new MiscTest ("testMiscParseGood6"));
51         suite.addTest (new MiscTest ("testMiscParseGood7"));
52         suite.addTest (new MiscTest ("testMiscParseGood8"));
53         suite.addTest (new MiscTest ("testMiscParseGood9"));
54         suite.addTest (new MiscTest ("testMiscParseGood10"));
55         suite.addTest (new MiscTest ("testMiscParseGood12"));
56         suite.addTest (new MiscTest ("testMiscParseGood13"));
57         suite.addTest (new MiscTest ("testMiscParseGood14"));
58         suite.addTest (new MiscTest ("testMiscParseGood15"));
59         suite.addTest (new MiscTest ("testMiscParseGood16"));
60         suite.addTest (new MiscTest ("testMiscParseGood17"));
61         suite.addTest (new MiscTest ("testMiscParseGood18"));
62         suite.addTest (new MiscTest ("testMiscParseGood19"));
63         suite.addTest (new MiscTest ("testMiscParseGood20"));
64
65         return suite;
66     }
67
68
69     public void testMiscParseGood1 ()
70     {
71         String JavaDoc file[] = new String JavaDoc[3];
72         file[0] = "-d";
73         file[1] = TestUtils.testHome() + "/src/generated";
74         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/basetypes.idl";
75
76         assertTrue ("Compiled basetypes.idl", org.jacorb.idl.parser.compileAndHandle (file));
77     }
78
79
80     public void testMiscParseGood2 ()
81     {
82         String JavaDoc file[] = new String JavaDoc[3];
83         file[0] = "-d";
84         file[1] = TestUtils.testHome() + "/src/generated";
85         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/inherit.idl";
86
87         assertTrue ("Compiled inherit.idl", org.jacorb.idl.parser.compileAndHandle (file));
88     }
89
90
91
92     public void testMiscParseGood3 ()
93     {
94         String JavaDoc file[] = new String JavaDoc[4];
95         file[0] = "-DBLUB";
96         file[1] = "-d";
97         file[2] = TestUtils.testHome() + "/src/generated";
98         file[3] = TestUtils.testHome() + "/idl/compiler/succeed/defined.idl";
99
100         assertTrue ("Compiled defined.idl", org.jacorb.idl.parser.compileAndHandle (file));
101     }
102
103
104     public void testMiscParseGood4 ()
105     {
106         String JavaDoc file[] = new String JavaDoc[4];
107         file[0] = "-I" + TestUtils.testHome() + "/../../idl/omg";
108         file[1] = "-d";
109         file[2] = TestUtils.testHome() + "/src/generated";
110         file[3] = TestUtils.testHome() + "/idl/compiler/succeed/Interoperability.idl";
111         assertTrue ("Compiled Interoperability.idl", org.jacorb.idl.parser.compileAndHandle (file));
112     }
113
114
115     public void testMiscParseGood5 ()
116     {
117         String JavaDoc file[] = new String JavaDoc[3];
118         file[0] = "-d";
119         file[1] = TestUtils.testHome() + "/src/generated";
120         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/reopen.idl";
121         assertTrue ("Compiled reopen.idl", org.jacorb.idl.parser.compileAndHandle(file));
122     }
123
124
125     public void testMiscParseGood6 ()
126     {
127         String JavaDoc file[] = new String JavaDoc[4];
128         file[0] = "-all";
129         file[1] = "-d";
130         file[2] = TestUtils.testHome() + "/src/generated";
131         file[3] = TestUtils.testHome() + "/idl/compiler/succeed/include.idl";
132         assertTrue ("Compiled include.idl", org.jacorb.idl.parser.compileAndHandle(file));
133     }
134
135
136     public void testMiscParseGood7 ()
137     {
138         String JavaDoc file[] = new String JavaDoc[3];
139         file[0] = "-d";
140         file[1] = TestUtils.testHome() + "/src/generated";
141         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/names.idl";
142         assertTrue ("Compiled names.idl", org.jacorb.idl.parser.compileAndHandle(file));
143     }
144
145     public void testMiscParseGood8 ()
146     {
147         String JavaDoc file[] = new String JavaDoc[3];
148         file[0] = "-d";
149         file[1] = TestUtils.testHome() + "/src/generated";
150         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/raises.idl";
151         assertTrue ("Compiled raise.idl", org.jacorb.idl.parser.compileAndHandle(file));
152     }
153
154     public void testMiscParseGood9 ()
155     {
156         String JavaDoc file[] = new String JavaDoc[3];
157         file[0] = "-d";
158         file[1] = TestUtils.testHome() + "/src/generated";
159         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/scope.idl";
160         assertTrue ("Compiled scope.idl", org.jacorb.idl.parser.compileAndHandle(file));
161     }
162
163
164     public void testMiscParseGood10 ()
165     {
166         String JavaDoc file[] = new String JavaDoc[3];
167         file[0] = "-d";
168         file[1] = TestUtils.testHome() + "/src/generated";
169         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/typedefdStruct.idl";
170         assertTrue ("Compiled ex1.idl", org.jacorb.idl.parser.compileAndHandle(file));
171     }
172
173
174     public void testMiscParseGood12 ()
175     {
176         String JavaDoc file[] = new String JavaDoc[3];
177         file[0] = "-d";
178         file[1] = TestUtils.testHome() + "/src/generated";
179         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/reservedJavaWordRename.idl";
180         assertTrue ("Compiled reservedJavaWordRename.idl", org.jacorb.idl.parser.compileAndHandle(file));
181     }
182
183
184     public void testMiscParseGood13 ()
185     {
186         String JavaDoc file[] = new String JavaDoc[3];
187         file[0] = "-d";
188         file[1] = TestUtils.testHome() + "/src/generated";
189         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/scoping1.idl";
190         assertTrue ("Compiled scoping1.idl", org.jacorb.idl.parser.compileAndHandle(file));
191     }
192
193     public void testMiscParseGood14 ()
194     {
195         String JavaDoc file[] = new String JavaDoc[3];
196         file[0] = "-d";
197         file[1] = TestUtils.testHome() + "/src/generated";
198         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/scoping2.idl";
199         assertTrue ("Compiled scoping2.idl", org.jacorb.idl.parser.compileAndHandle(file));
200     }
201     public void testMiscParseGood15 ()
202     {
203         String JavaDoc file[] = new String JavaDoc[3];
204         file[0] = "-d";
205         file[1] = TestUtils.testHome() + "/src/generated";
206         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/scoping3.idl";
207         assertTrue ("Compiled scoping3.idl", org.jacorb.idl.parser.compileAndHandle(file));
208     }
209     public void testMiscParseGood16 ()
210     {
211         String JavaDoc file[] = new String JavaDoc[3];
212         file[0] = "-d";
213         file[1] = TestUtils.testHome() + "/src/generated";
214         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/scoping4.idl";
215         assertTrue ("Compiled scoping4.idl", org.jacorb.idl.parser.compileAndHandle(file));
216     }
217     public void testMiscParseGood17 ()
218     {
219         String JavaDoc file[] = new String JavaDoc[3];
220         file[0] = "-d";
221         file[1] = TestUtils.testHome() + "/src/generated";
222         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/scoping8.idl";
223         assertTrue ("Compiled scoping8.idl", org.jacorb.idl.parser.compileAndHandle(file));
224     }
225     public void testMiscParseGood18 ()
226     {
227         String JavaDoc file[] = new String JavaDoc[3];
228         file[0] = "-d";
229         file[1] = TestUtils.testHome() + "/src/generated";
230         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/scoping10.idl";
231         assertTrue ("Compiled scoping10.idl", org.jacorb.idl.parser.compileAndHandle(file));
232     }
233
234     public void testMiscParseGood19 ()
235     {
236         String JavaDoc file[] = new String JavaDoc[3];
237         file[0] = "-d";
238         file[1] = TestUtils.testHome() + "/src/generated";
239         file[2] = TestUtils.testHome() + "/idl/compiler/succeed/ReservedWord.idl";
240         assertTrue ("Compiled ReservedWord.idl", org.jacorb.idl.parser.compileAndHandle(file));
241     }
242
243     public void testMiscParseGood20 ()
244     {
245         String JavaDoc file[] = new String JavaDoc[4];
246         file[0] = "-DDefB";
247         file[1] = "-d";
248         file[2] = TestUtils.testHome() + "/src/generated";
249         file[3] = TestUtils.testHome() + "/idl/compiler/succeed/Ping1.idl";
250         assertTrue ("Compiled Ping1.idl", org.jacorb.idl.parser.compileAndHandle(file));
251     }
252
253
254 }
255
Popular Tags