net.sf.antcontrib.cpptasks
Class TestLinkerDef

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sf.antcontrib.cpptasks.TestProcessorDef
              extended by net.sf.antcontrib.cpptasks.TestLinkerDef
All Implemented Interfaces:
junit.framework.Test

public final class TestLinkerDef
extends TestProcessorDef

Tests for LinkerDef class.


Constructor Summary
TestLinkerDef(java.lang.String name)
          Constructor.
 
Method Summary
protected  net.sf.antcontrib.cpptasks.ProcessorDef create()
          Creates a processor.
protected  java.lang.String[] getPreArguments(net.sf.antcontrib.cpptasks.ProcessorDef processor)
          Gets the command line arguments that appear before the filenames.
 void testExtendsBase()
          Tests that the base attribute in the base linker is effective when creating the command line for a linker that extends it.
 void testExtendsClassname()
          Tests that the classname attribute in the base linker is effective when creating the command line for a linker that extends it.
 void testExtendsEntry()
          Tests that the entry attribute in the base linker is effective when creating the command line for a linker that extends it.
 void testExtendsFileSet()
          Tests that fileset's that appear in the base linker are effective when creating the command line for a linker that extends it.
 void testExtendsFixed()
          Tests that the fixed attribute in the base linker is effective when creating the command line for a linker that extends it.
 void testExtendsIncremental()
          Tests that the incremental attribute in the base linker is effective when creating the command line for a linker that extends it.
 void testExtendsLibSet()
          Tests that libset's that appear in the base linker are effective when creating the command line for a linker that extends it.
 void testExtendsLinkerArgs()
          Tests that linkerarg's that appear in the base linker are effective when creating the command line for a linker that extends it.
 void testExtendsLinkerArgsViaReference()
          Verify linkerarg's that appear in the base linker are effective when creating the command line for a linker that extends it, even if the linker is brought in through a reference.
 void testExtendsMap()
          Tests that the map attribute in the base linker is effective when creating the command line for a linker that extends it.
 void testExtendsName()
          Tests that the name attribute in the base linker is effective when creating the command line for a linker that extends it.
 void testExtendsRebuild()
          Tests that the rebuild attribute in the base linker is effective when creating the command line for a linker that extends it.
 void testExtendsStack()
          Tests that the stack attribute in the base linker is effective when creating the command line for a linker that extends it.
 void testExtendsSysLibSet()
          Tests that syslibset's that appear in the base linker are effective when creating the command line for a linker that extends it.
 void testGetGcc()
          Test if setting the classname attribute to the name of the GCC linker results in the singleton GCC linker.
 void testGetMSVC()
          Test if setting the classname attribute to the name of the MSVC linker results in the singleton MSVC linker.
 void testUnknownClass()
          Tests if setting the classname attribute to an bogus classname results in a BuildException.
 void testWrongType()
          Tests if setting the classname to the name of a class that doesn't support Linker throws a BuildException.
 
Methods inherited from class net.sf.antcontrib.cpptasks.TestProcessorDef
createExtendedProcessorDef, getConfiguration, testExtendsDebug, testExtendsFileSet, testExtendsIf, testExtendsRebuild, testExtendsUnless, testIsActive2, testIsActive3, testIsActive4, testIsActive5, testIsActive6, testIsActive7, testIsActive8
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestLinkerDef

public TestLinkerDef(java.lang.String name)
Constructor.

Parameters:
name - test name
Method Detail

create

protected net.sf.antcontrib.cpptasks.ProcessorDef create()
Creates a processor.

Specified by:
create in class TestProcessorDef
Returns:
new linker

testGetGcc

public void testGetGcc()
Test if setting the classname attribute to the name of the GCC linker results in the singleton GCC linker.


testGetMSVC

public void testGetMSVC()
Test if setting the classname attribute to the name of the MSVC linker results in the singleton MSVC linker.


testUnknownClass

public void testUnknownClass()
Tests if setting the classname attribute to an bogus classname results in a BuildException.


testWrongType

public void testWrongType()
Tests if setting the classname to the name of a class that doesn't support Linker throws a BuildException.


getPreArguments

protected java.lang.String[] getPreArguments(net.sf.antcontrib.cpptasks.ProcessorDef processor)
Gets the command line arguments that appear before the filenames.

Specified by:
getPreArguments in class TestProcessorDef
Parameters:
processor - processor under test
Returns:
command line arguments

testExtendsLinkerArgs

public void testExtendsLinkerArgs()
Tests that linkerarg's that appear in the base linker are effective when creating the command line for a linker that extends it.


testExtendsLinkerArgsViaReference

public void testExtendsLinkerArgsViaReference()
Verify linkerarg's that appear in the base linker are effective when creating the command line for a linker that extends it, even if the linker is brought in through a reference.


testExtendsFileSet

public void testExtendsFileSet()
                        throws java.io.IOException
Tests that fileset's that appear in the base linker are effective when creating the command line for a linker that extends it.

Throws:
java.io.IOException - if unable to create or delete temporary file

testExtendsLibSet

public void testExtendsLibSet()
Tests that libset's that appear in the base linker are effective when creating the command line for a linker that extends it.


testExtendsSysLibSet

public void testExtendsSysLibSet()
Tests that syslibset's that appear in the base linker are effective when creating the command line for a linker that extends it.


testExtendsBase

public void testExtendsBase()
Tests that the base attribute in the base linker is effective when creating the command line for a linker that extends it.


testExtendsStack

public void testExtendsStack()
Tests that the stack attribute in the base linker is effective when creating the command line for a linker that extends it.


testExtendsEntry

public void testExtendsEntry()
Tests that the entry attribute in the base linker is effective when creating the command line for a linker that extends it.


testExtendsFixed

public void testExtendsFixed()
Tests that the fixed attribute in the base linker is effective when creating the command line for a linker that extends it.


testExtendsIncremental

public void testExtendsIncremental()
Tests that the incremental attribute in the base linker is effective when creating the command line for a linker that extends it.


testExtendsMap

public void testExtendsMap()
Tests that the map attribute in the base linker is effective when creating the command line for a linker that extends it.


testExtendsRebuild

public void testExtendsRebuild()
Tests that the rebuild attribute in the base linker is effective when creating the command line for a linker that extends it.


testExtendsName

public void testExtendsName()
Tests that the name attribute in the base linker is effective when creating the command line for a linker that extends it.


testExtendsClassname

public void testExtendsClassname()
Tests that the classname attribute in the base linker is effective when creating the command line for a linker that extends it.



Copyright © 2001-2008 Ant-Contrib Project. All Rights Reserved.