Examples of AbstractLdLinker


Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

     *
     * See [ 676276 ] Enhanced support for Mac OS X
     */
    public void testAddImpliedArgsDarwinPlugin() {
        System.setProperty("os.name", "Mac OS X");
        AbstractLdLinker linker = getLinker();
        Vector args = new Vector();
        LinkType pluginType = new LinkType();
        OutputTypeEnum pluginOutType = new OutputTypeEnum();
        pluginOutType.setValue("plugin");
        pluginType.setOutputType(pluginOutType);
        linker.addImpliedArgs(null, false, pluginType, args);
        assertEquals(1, args.size());
        assertEquals("-bundle", args.elementAt(0));
    }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

     *
     * See [ 676276 ] Enhanced support for Mac OS X
     */
    public void testAddImpliedArgsDarwinShared() {
        System.setProperty("os.name", "Mac OS X");
        AbstractLdLinker linker = getLinker();
        Vector args = new Vector();
        LinkType pluginType = new LinkType();
        OutputTypeEnum pluginOutType = new OutputTypeEnum();
        pluginOutType.setValue("shared");
        pluginType.setOutputType(pluginOutType);
        linker.addImpliedArgs(null, false, pluginType, args);
        // FIXME NAR-103
        // BEGINFREEHEP
        assertEquals(1, args.size());
        assertEquals("-dynamiclib", args.elementAt(0));
        // ENDFREEHEP
View Full Code Here

Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

     *
     * See [ 676276 ] Enhanced support for Mac OS X
     */
    public void testAddImpliedArgsNonDarwinPlugin() {
        System.setProperty("os.name", "VAX/VMS");
        AbstractLdLinker linker = getLinker();
        Vector args = new Vector();
        LinkType pluginType = new LinkType();
        OutputTypeEnum pluginOutType = new OutputTypeEnum();
        pluginOutType.setValue("plugin");
        pluginType.setOutputType(pluginOutType);
        linker.addImpliedArgs(null, false, pluginType, args);
        assertEquals(1, args.size());
        assertEquals("-shared", args.elementAt(0));
    }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

     *
     * See [ 676276 ] Enhanced support for Mac OS X
     */
    public void testAddImpliedArgsNonDarwinShared() {
        System.setProperty("os.name", "VAX/VMS");
        AbstractLdLinker linker = getLinker();
        Vector args = new Vector();
        LinkType pluginType = new LinkType();
        OutputTypeEnum pluginOutType = new OutputTypeEnum();
        pluginOutType.setValue("shared");
        pluginType.setOutputType(pluginOutType);
        linker.addImpliedArgs(null, false, pluginType, args);
        assertEquals(1, args.size());
        assertEquals("-shared", args.elementAt(0));
    }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

        linker.addImpliedArgs(null, false, pluginType, args);
        assertEquals(1, args.size());
        assertEquals("-shared", args.elementAt(0));
    }
    public void testAddLibrarySetDirSwitch() {
        AbstractLdLinker linker = getLinker();
        CCTask task = new CCTask();
        LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
        /* throws an Exception in setLibs otherwise */
        sets[0].setProject(new org.apache.tools.ant.Project());
        sets[0].setDir(new File("/foo"));
        sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
        Vector preargs = new Vector();
        Vector midargs = new Vector();
        Vector endargs = new Vector();
        String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
                endargs);
        String libdirSwitch = (String) endargs.elementAt(0);
        assertEquals(libdirSwitch.substring(0, 2), "-L");
        //
        //  can't have space after -L or will break Mac OS X
View Full Code Here

Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

        //
        assertTrue(!libdirSwitch.substring(2, 3).equals(" "));
        assertEquals(libdirSwitch.substring(libdirSwitch.length() - 3), "foo");
    }
    public void testAddLibrarySetLibSwitch() {
        AbstractLdLinker linker = getLinker();
        CCTask task = new CCTask();
        LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
        /* throws an Exception in setLibs otherwise */
        sets[0].setProject(new org.apache.tools.ant.Project());
        sets[0].setDir(new File("/foo"));
        sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
        Vector preargs = new Vector();
        Vector midargs = new Vector();
        Vector endargs = new Vector();
        String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
                endargs);
        assertEquals("-lbart", (String) endargs.elementAt(1));
        assertEquals("-lcart", (String) endargs.elementAt(2));
        assertEquals("-ldart", (String) endargs.elementAt(3));
        assertEquals(endargs.size(), 4);
View Full Code Here

Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

        assertEquals("-ldart", (String) endargs.elementAt(3));
        assertEquals(endargs.size(), 4);
    }
    public void testAddLibrarySetLibFrameworkNonDarwin() {
        System.setProperty("os.name", "VAX/VMS");
        AbstractLdLinker linker = getLinker();
        CCTask task = new CCTask();
        LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
        /* throws an Exception in setLibs otherwise */
        sets[0].setProject(new org.apache.tools.ant.Project());
        sets[0].setDir(new File("/foo"));
        LibraryTypeEnum libType = new LibraryTypeEnum();
        libType.setValue("framework");
        sets[0].setType(libType);
        sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
        Vector preargs = new Vector();
        Vector midargs = new Vector();
        Vector endargs = new Vector();
        String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
                endargs);
        assertEquals("-L", ((String) endargs.elementAt(0)).substring(0, 2));
// FIXME NAR-103
// BEGINFREEHEP
//        assertEquals("-Bdynamic", (String) endargs.elementAt(1));
View Full Code Here

Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

        assertEquals(endargs.size(), 4);
     // ENDFREEHEP
    }
    public void testAddLibrarySetLibFrameworkDarwin() {
        System.setProperty("os.name", "Mac OS X");
        AbstractLdLinker linker = getLinker();
        CCTask task = new CCTask();
        LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
        /* throws an Exception in setLibs otherwise */
        sets[0].setProject(new org.apache.tools.ant.Project());
        sets[0].setDir(new File("/foo"));
        LibraryTypeEnum libType = new LibraryTypeEnum();
        libType.setValue("framework");
        sets[0].setType(libType);
        sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
        Vector preargs = new Vector();
        Vector midargs = new Vector();
        Vector endargs = new Vector();
        String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
                endargs);
// FIXME NAR-103
// BEGINFREEHEP
        /*
        assertEquals("-F", ((String) endargs.elementAt(0)).substring(0, 2));
View Full Code Here

Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

        assertEquals("dart", (String) endargs.elementAt(4));
        assertEquals(endargs.size(), 5);
// ENDFREEHEP
    }
    public void testAddLibraryStatic() {
        AbstractLdLinker linker = getLinker();
        CCTask task = new CCTask();
        LibrarySet[] sets = new LibrarySet[]{
            new LibrarySet(),
        new LibrarySet(),
        new LibrarySet()};
        /* throws an Exception in setLibs otherwise */
        sets[0].setProject(new org.apache.tools.ant.Project());
        sets[0].setLibs(new CUtil.StringArrayBuilder("bart"));
        sets[1].setProject(new org.apache.tools.ant.Project());
        sets[1].setLibs(new CUtil.StringArrayBuilder("cart"));
        LibraryTypeEnum libType = new LibraryTypeEnum();
        libType.setValue("static");
        sets[1].setType(libType);
        sets[2].setProject(new org.apache.tools.ant.Project());
        sets[2].setLibs(new CUtil.StringArrayBuilder("dart"));
        Vector preargs = new Vector();
        Vector midargs = new Vector();
        Vector endargs = new Vector();
        String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
                endargs);
//        for (int i=0; i<endargs.size(); i++) System.err.println(endargs.get( i ));
// NAR-103
// BEGINFREEHEP
        if (System.getProperty("os.name").equals("Mac OS X")) {
View Full Code Here

Examples of com.github.maven_nar.cpptasks.gcc.AbstractLdLinker

            assertEquals(endargs.size(), 5);
        }
// ENDFREEHEP
    }
    public void testLibReturnValue() {
        AbstractLdLinker linker = getLinker();
        CCTask task = new CCTask();
        LibrarySet[] sets = new LibrarySet[]{new LibrarySet()};
        /* throws an Exception in setLibs otherwise */
        sets[0].setProject(new org.apache.tools.ant.Project());
        sets[0].setDir(new File("/foo"));
        sets[0].setLibs(new CUtil.StringArrayBuilder("bart,cart,dart"));
        Vector preargs = new Vector();
        Vector midargs = new Vector();
        Vector endargs = new Vector();
        String[] rc = linker.addLibrarySets(task, sets, preargs, midargs,
                endargs);
        assertEquals(3, rc.length);
        assertEquals("bart", rc[0]);
        assertEquals("cart", rc[1]);
        assertEquals("dart", rc[2]);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.