Package com.github.maven_nar.cpptasks

Examples of com.github.maven_nar.cpptasks.TargetInfo


        hasSame = targetInfo.getSources()[0].equals(new File("boo.far"));
        assertEquals(hasSame, false);
    }
    public void testMustRebuild() {
        CompilerConfiguration config = new DummyConfiguration();
        TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
                "FoO.BaR")}, null, new File("foo.o"), false);
        assertEquals(false, targetInfo.getRebuild());
        targetInfo.mustRebuild();
        assertEquals(true, targetInfo.getRebuild());
    }
View Full Code Here


        List<PBXObjectRef> sourceGroupChildren = new ArrayList<PBXObjectRef>();

        List<File> sourceList = new ArrayList<File>(targets.size());
        Iterator<TargetInfo> targetIter = targets.values().iterator();
        while (targetIter.hasNext()) {
            TargetInfo info = targetIter.next();
            File[] targetsources = info.getSources();
            for (int i = 0; i < targetsources.length; i++) {
                sourceList.add(targetsources[i]);
            }
        }
        File[] sortedSources = sourceList.toArray(new File[sourceList.size()]);
View Full Code Here

        //
        //   get the first target and assume that it is representative
        //
        Iterator targetIter = targets.values().iterator();
        while (targetIter.hasNext()) {
            TargetInfo targetInfo = (TargetInfo) targetIter.next();
            ProcessorConfiguration config = targetInfo.getConfiguration();
            //
            //   for the first cl compiler
            //
            if (config instanceof CommandLineCompilerConfiguration) {
                compilerConfig = (CommandLineCompilerConfiguration) config;
View Full Code Here

                                 compilerConfig.getCommand());
    }

    Iterator<TargetInfo> targetIter = targets.values().iterator();
    while (targetIter.hasNext()) {
      TargetInfo info = targetIter.next();
      File[] targetsources = info.getSources();
      for (int i = 0; i < targetsources.length; i++) {
        String relativePath = CUtil.getRelativePath(basePath,
            targetsources[i]);
        fileAttributes.setValue(0, relativePath);
        content.startElement(null, "file", "file", fileAttributes);
View Full Code Here

    //
    //   get the first target and assume that it is representative
    //
    Iterator<TargetInfo> targetIter = targets.values().iterator();
    while (targetIter.hasNext()) {
      TargetInfo targetInfo = targetIter.next();
      ProcessorConfiguration config = targetInfo.getConfiguration();
      String identifier = config.getIdentifier();
      //
      //   for the first gcc or bcc compiler
      //
      if (config instanceof CommandLineCompilerConfiguration) {
View Full Code Here

    public TestTargetInfo(String name) {
        super(name);
    }
    public void testConstructorNullConfig() {
        try {
            new TargetInfo(null, new File[]{new File("")}, null, new File(""),
                    false);
            fail("Didn't throw exception");
        } catch (NullPointerException ex) {
        }
    }
View Full Code Here

        }
    }
    public void testConstructorNullOutput() {
        CompilerConfiguration config = new DummyConfiguration();
        try {
            new TargetInfo(config, new File[]{new File("")}, null, null, false);
            fail("Didn't throw exception");
        } catch (NullPointerException ex) {
        }
    }
View Full Code Here

        }
    }
    public void testConstructorNullSource() {
        CompilerConfiguration config = new DummyConfiguration();
        try {
            new TargetInfo(config, null, null, new File(""), false);
            fail("Didn't throw exception");
        } catch (NullPointerException ex) {
        }
    }
View Full Code Here

        } catch (NullPointerException ex) {
        }
    }
    public void testGetRebuild() {
        CompilerConfiguration config = new DummyConfiguration();
        TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
                "FoO.BaR")}, null, new File("foo.o"), false);
        assertEquals(false, targetInfo.getRebuild());
        targetInfo = new TargetInfo(config, new File[]{new File("FoO.BaR")},
                null, new File("foo.o"), true);
        assertEquals(true, targetInfo.getRebuild());
    }
View Full Code Here

                null, new File("foo.o"), true);
        assertEquals(true, targetInfo.getRebuild());
    }
    public void testGetSource() {
        CompilerConfiguration config = new DummyConfiguration();
        TargetInfo targetInfo = new TargetInfo(config, new File[]{new File(
                "FoO.BaR")}, null, new File("foo.o"), false);
        String source = targetInfo.getSources()[0].getName();
        assertEquals(source, "FoO.BaR");
    }
View Full Code Here

TOP

Related Classes of com.github.maven_nar.cpptasks.TargetInfo

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.