Examples of DefineArgument


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

  public void testGetActiveDefines() {
    Project project = new org.apache.tools.ant.Project();
    CompilerDef def = new CompilerDef();
    def.setProject(project);
    DefineSet defset = new DefineSet();
    DefineArgument arg1 = new DefineArgument();
    arg1.setName("DEBUG");
    arg1.setIf("debug");
    defset.addDefine(arg1);
    DefineArgument arg2 = new DefineArgument();
    arg2.setName("NDEBUG");
    arg2.setUnless("debug");
    defset.addDefine(arg2);
    def.addConfiguredDefineset(defset);
    //
    //  Evaluate without "debug" set
    //
View Full Code Here

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

   * effective.
   */
  public void testExtendsDefineSet() {
    CompilerDef baseCompiler = new CompilerDef();
    DefineSet defSet = new DefineSet();
    DefineArgument define = new DefineArgument();
    define.setName("foo");
    define.setValue("bar");
    defSet.addDefine(define);
    baseCompiler.addConfiguredDefineset(defSet);
    CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef(
        baseCompiler);
    String[] preArgs = getPreArguments(extendedCompiler);
View Full Code Here

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

      task.addConfiguredCompiler(cpp);
    }
   
    // add VCPROJ_MOJO def (see UnitTestDriverImpl.cpp generated by Krusoe plugin)
    DefineSet defineSet = new DefineSet();
    DefineArgument defineArgument = new DefineArgument();
    defineArgument.setName("VCPROJ_MOJO");
    defineSet.addDefine(defineArgument);
    cpp.addConfiguredDefineset(defineSet);
   
   
    // add javah include path
View Full Code Here

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

public class TestDefineArgument extends TestCase {
    public TestDefineArgument(String name) {
        super(name);
    }
    public void testIsActive1() {
        DefineArgument arg = new DefineArgument();
        Project project = new Project();
        try {
            boolean isActive = arg.isActive(project);
        } catch (BuildException ex) {
            return;
        }
        fail("isActive should throw exception if name is not set");
    }
View Full Code Here

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

            return;
        }
        fail("isActive should throw exception if name is not set");
    }
    public void testIsActive2() {
        DefineArgument arg = new DefineArgument();
        arg.setName("TEST");
        Project project = new Project();
        project.setProperty("cond", "");
        arg.setIf("cond");
        assertTrue(arg.isActive(project));
    }
View Full Code Here

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

        project.setProperty("cond", "");
        arg.setIf("cond");
        assertTrue(arg.isActive(project));
    }
    public void testIsActive3() {
        DefineArgument arg = new DefineArgument();
        arg.setName("TEST");
        Project project = new Project();
        arg.setIf("cond");
        assertTrue(!arg.isActive(project));
    }
View Full Code Here

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

        Project project = new Project();
        arg.setIf("cond");
        assertTrue(!arg.isActive(project));
    }
    public void testIsActive4() {
        DefineArgument arg = new DefineArgument();
        arg.setName("TEST");
        Project project = new Project();
        project.setProperty("cond", "false");
        arg.setIf("cond");
        try {
            boolean isActive = arg.isActive(project);
        } catch (BuildException ex) {
            return;
        }
        fail("Should throw exception for suspicious value");
    }
View Full Code Here

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

            return;
        }
        fail("Should throw exception for suspicious value");
    }
    public void testIsActive5() {
        DefineArgument arg = new DefineArgument();
        arg.setName("TEST");
        Project project = new Project();
        project.setProperty("cond", "");
        arg.setUnless("cond");
        assertTrue(!arg.isActive(project));
    }
View Full Code Here

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

        project.setProperty("cond", "");
        arg.setUnless("cond");
        assertTrue(!arg.isActive(project));
    }
    public void testIsActive6() {
        DefineArgument arg = new DefineArgument();
        arg.setName("TEST");
        Project project = new Project();
        arg.setUnless("cond");
        assertTrue(arg.isActive(project));
    }
View Full Code Here

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

        Project project = new Project();
        arg.setUnless("cond");
        assertTrue(arg.isActive(project));
    }
    public void testIsActive7() {
        DefineArgument arg = new DefineArgument();
        arg.setName("TEST");
        Project project = new Project();
        project.setProperty("cond", "false");
        arg.setUnless("cond");
        try {
            boolean isActive = arg.isActive(project);
        } catch (BuildException ex) {
            return;
        }
        fail("Should throw exception for suspicious value");
    }
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.