net.sf.farrago.fennel.calc
Class CalcProgramBuilderTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
net.sf.farrago.fennel.calc.CalcProgramBuilderTest
- All Implemented Interfaces:
- Test
public class CalcProgramBuilderTest
- extends TestCase
Unit test for CalcProgramBuilder
.
- Since:
- Jan 11, 2004
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/fennel/calc/CalcProgramBuilderTest.java#1 $
- Author:
- jhyde
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, failNotEquals, failNotSame, failSame, format |
NL
public static final String NL
T
public static final String T
builder
CalcProgramBuilder builder
CalcProgramBuilderTest
public CalcProgramBuilderTest(String name)
setUp
public void setUp()
throws Exception
- Overrides:
setUp
in class TestCase
- Throws:
Exception
testEmpty
public void testEmpty()
- Tests that the empty program works.
testReturnConstant
public void testReturnConstant()
testComments
public void testComments()
testRef
public void testRef()
testRefFails
public void testRefFails()
testUseSameConstantTwice
public void testUseSameConstantTwice()
testInconstentTypes
public void testInconstentTypes()
testCallSubstr
public void testCallSubstr()
testJmpToNoWhere
public void testJmpToNoWhere()
testJumpingBack
public void testJumpingBack()
- Tests if the builder asserts when trying to call jump to a previous line.
If there is a need to have loops in the future. Remove the assert check
in the builder
testJumpingToItSelf
public void testJumpingToItSelf()
testLabelJump
public void testLabelJump()
testLabelJumpFails
public void testLabelJumpFails()
testLabelJumpToItself
public void testLabelJumpToItself()
testLabelMultipleTimes
public void testLabelMultipleTimes()
testJumpBooleanFails
public void testJumpBooleanFails()
throws Exception
- Throws:
Exception
testAddBoolInstructionFails
public void testAddBoolInstructionFails()
throws Exception
- Throws:
Exception
testAddDivideByZeroFail
public void testAddDivideByZeroFail()
throws Exception
- Throws:
Exception
testAddNativeInstructionsFail
public void testAddNativeInstructionsFail()
throws Exception
- Throws:
Exception
testIntegralNativeInstructionsFail
public void testIntegralNativeInstructionsFail()
throws Exception
- Throws:
Exception
testPointerBoolInstructionsFail
public void testPointerBoolInstructionsFail()
throws Exception
- Throws:
Exception
getMethods
List<Method> getMethods(String pattern)
assertExceptionIsThrown
void assertExceptionIsThrown(Method method,
Object[] args,
String expectedMsg)
throws Exception
- Throws:
Exception
assertExceptionIsThrown
void assertExceptionIsThrown(CalcProgramBuilder.InstructionDef instr,
CalcProgramBuilder.Operand[] args,
String expectedMsg)
throws Exception
- Throws:
Exception
assertExceptionIsThrown
void assertExceptionIsThrown(String methodName,
Object[] args,
String expectedMsg)
throws Exception
- Throws:
Exception
assertExceptionIsThrown
void assertExceptionIsThrown(String expectedMsg)