Ignore:
Timestamp:
11/23/05 10:55:33 (19 years ago)
Author:
boris
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/org.modelica.mdt.test/src/org/modelica/mdt/test/TestTraversingPackages.java

    r158 r160  
    4848import org.modelica.mdt.core.IModelicaPackage;
    4949import org.modelica.mdt.internal.omcproxy.CompilerException;
    50 import org.modelica.mdt.internal.omcproxy.InitializationException;
    5150import org.modelica.mdt.test.util.Area51Projects;
    5251import org.modelica.mdt.test.util.Utility;
     
    7675    }
    7776   
    78     public void testTraverse() throws CoreException, InitializationException
     77    public void testTraverse() throws CoreException, CompilerException
    7978    {
    8079        IModelicaPackage root_package = null;
     
    8281        IModelicaFile root_package_model = null;
    8382        IModelicaFile root_package_function = null;
     83
    8484        /* for a temporal reference too package.mo */
    8585        IModelicaFile package_mo = null;
     86
    8687        /* root_package/plain_file */
    8788        IFile root_package_plain_file = null;
     89
    8890        /* root_package/root_package_folder */
    8991        IModelicaFolder root_package_folder = null;
     
    9395        IModelicaFile sub_package_model = null;
    9496
    95 
    9697        /*
    9798         * traverse children of project_root
     
    120121        }
    121122        assertNotNull("root_package not found", root_package);
    122         assertEquals("Package base name", root_package.getBaseName(), "");
     123        assertEquals("Package base name", root_package.getPrefix(), "");
    123124        assertEquals("Package name", root_package.getElementName(),
    124125                "root_package");
    125126               
    126127        assertNotNull("childless_package not found", childless_package);
    127         assertEquals("Package base name", childless_package.getBaseName(), "");
     128        assertEquals("Package base name", childless_package.getPrefix(), "");
    128129        assertEquals("Package name", childless_package.getElementName(),
    129130                "childless_package");
     
    211212        try
    212213        {
    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            }
    222223        }
    223224        catch(CompilerException e)
     
    262263        assertEquals("Package full name does not match",
    263264                     fullName, 
    264                      zePackage.getBaseName() + "." +
     265                     zePackage.getPrefix() + "." +
    265266                             zePackage.getElementName());
    266267    }
Note: See TracChangeset for help on using the changeset viewer.