- Timestamp:
- 11/23/05 10:55:33 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.test/src/org/modelica/mdt/test/TestTraversingPackages.java
r158 r160 48 48 import org.modelica.mdt.core.IModelicaPackage; 49 49 import org.modelica.mdt.internal.omcproxy.CompilerException; 50 import org.modelica.mdt.internal.omcproxy.InitializationException;51 50 import org.modelica.mdt.test.util.Area51Projects; 52 51 import org.modelica.mdt.test.util.Utility; … … 76 75 } 77 76 78 public void testTraverse() throws CoreException, InitializationException77 public void testTraverse() throws CoreException, CompilerException 79 78 { 80 79 IModelicaPackage root_package = null; … … 82 81 IModelicaFile root_package_model = null; 83 82 IModelicaFile root_package_function = null; 83 84 84 /* for a temporal reference too package.mo */ 85 85 IModelicaFile package_mo = null; 86 86 87 /* root_package/plain_file */ 87 88 IFile root_package_plain_file = null; 89 88 90 /* root_package/root_package_folder */ 89 91 IModelicaFolder root_package_folder = null; … … 93 95 IModelicaFile sub_package_model = null; 94 96 95 96 97 /* 97 98 * traverse children of project_root … … 120 121 } 121 122 assertNotNull("root_package not found", root_package); 122 assertEquals("Package base name", root_package.get BaseName(), "");123 assertEquals("Package base name", root_package.getPrefix(), ""); 123 124 assertEquals("Package name", root_package.getElementName(), 124 125 "root_package"); 125 126 126 127 assertNotNull("childless_package not found", childless_package); 127 assertEquals("Package base name", childless_package.get BaseName(), "");128 assertEquals("Package base name", childless_package.getPrefix(), ""); 128 129 assertEquals("Package name", childless_package.getElementName(), 129 130 "childless_package"); … … 211 212 try 212 213 { 213 for (IModelicaPackage pkg : sub_package.getPackages())214 {215 String name = pkg.getElementName();216 if (name.equals("leaf_package"))217 {218 leaf_package = pkg;219 }220 221 }214 for (IModelicaPackage pkg : sub_package.getPackages()) 215 { 216 String name = pkg.getElementName(); 217 if (name.equals("leaf_package")) 218 { 219 leaf_package = pkg; 220 } 221 222 } 222 223 } 223 224 catch(CompilerException e) … … 262 263 assertEquals("Package full name does not match", 263 264 fullName, 264 zePackage.get BaseName() + "." +265 zePackage.getPrefix() + "." + 265 266 zePackage.getElementName()); 266 267 }
Note: See TracChangeset
for help on using the changeset viewer.