Package com.github.maven_nar.cpptasks.types

Examples of com.github.maven_nar.cpptasks.types.UndefineArgument


            merged = UndefineArgument.merge(defs[i].getActiveDefines(), merged);
        }
        StringBuffer buf = new StringBuffer(30);
        for (int i = 0; i < merged.length; i++) {
            buf.setLength(0);
            UndefineArgument current = merged[i];
            if (current.isDefine()) {
                getDefineSwitch(buf, current.getName(), current.getValue());
            } else {
                getUndefineSwitch(buf, current.getName());
            }
            args.addElement(buf.toString());
        }
    }
View Full Code Here


    public void testMerge() {
        UndefineArgument[] base = new UndefineArgument[2];
        UndefineArgument[] specific = new UndefineArgument[2];
        base[0] = new DefineArgument();
        base[0].setName("foo");
        base[1] = new UndefineArgument();
        base[1].setName("hello");
        specific[0] = new DefineArgument();
        specific[0].setName("hello");
        specific[1] = new UndefineArgument();
        specific[1].setName("world");
        UndefineArgument[] merged = UndefineArgument.merge(base, specific);
        assertEquals(3, merged.length);
        assertEquals("foo", merged[0].getName());
        assertEquals(true, merged[0].isDefine());
View Full Code Here

            merged = DefineArgument.merge(defs[i].getActiveDefines(), merged);
        }
        StringBuffer buf = new StringBuffer(30);
        for (int i = 0; i < merged.length; i++) {
            buf.setLength(0);
            UndefineArgument current = merged[i];
            if (current.isDefine()) {
                args.addElement("-D");
                buf.append(current.getName());
                if (current.getValue() != null
                        && current.getValue().length() > 0) {
                    buf.append('=');
                    buf.append(current.getValue());
                }
                args.addElement(buf.toString());
            } else {
                args.addElement("-U");
                args.addElement(current.getName());
            }
        }
    }
View Full Code Here

    public void testMerge() {
        UndefineArgument[] base = new UndefineArgument[2];
        UndefineArgument[] specific = new UndefineArgument[2];
        base[0] = new DefineArgument();
        base[0].setName("foo");
        base[1] = new UndefineArgument();
        base[1].setName("hello");
        specific[0] = new DefineArgument();
        specific[0].setName("hello");
        specific[1] = new UndefineArgument();
        specific[1].setName("world");
        UndefineArgument[] merged = UndefineArgument.merge(base, specific);
        assertEquals(3, merged.length);
        assertEquals("foo", merged[0].getName());
        assertEquals(true, merged[0].isDefine());
View Full Code Here

            merged = UndefineArgument.merge(defs[i].getActiveDefines(), merged);
        }
        StringBuffer buf = new StringBuffer(30);
        for (int i = 0; i < merged.length; i++) {
            buf.setLength(0);
            UndefineArgument current = merged[i];
            if (current.isDefine()) {
                getDefineSwitch(buf, current.getName(), current.getValue());
            } else {
                getUndefineSwitch(buf, current.getName());
            }
            args.addElement(buf.toString());
        }
    }
View Full Code Here

            merged = DefineArgument.merge(defs[i].getActiveDefines(), merged);
        }
        StringBuffer buf = new StringBuffer(30);
        for (int i = 0; i < merged.length; i++) {
            buf.setLength(0);
            UndefineArgument current = merged[i];
            if (current.isDefine()) {
                args.addElement("-D");
                buf.append(current.getName());
                if (current.getValue() != null
                        && current.getValue().length() > 0) {
                    buf.append('=');
                    buf.append(current.getValue());
                }
                args.addElement(buf.toString());
            } else {
                args.addElement("-U");
                args.addElement(current.getName());
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.github.maven_nar.cpptasks.types.UndefineArgument

Copyright © 2018 www.massapicom. 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.