frysk.expr
Class TestArithmetics

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by frysk.junit.TestCase
              extended by frysk.expr.TestArithmetics
All Implemented Interfaces:
Test

public class TestArithmetics
extends TestCase

Scratch is for the case where there isn't any symbols, basic ops should still work.


Constructor Summary
TestArithmetics()
           
 
Method Summary
private  void checkErrorExpr(String input, String error)
           
private  void checkExprType(String expr, String resultType)
           
private  void checkScratchExpr(String expr, long value)
           
private  void checkVariableExpr(String expr, long value)
           
 void testAdd()
           
 void testArrayAccess()
           
 void testArraySlice()
           
 void testDecrement()
           
 void testEndOfFileError()
           
 void testExpressionError()
           
 void testIncrement()
           
 void testMember()
           
 void testTokenError()
           
 void testTypes()
           
 
Methods inherited from class frysk.junit.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, getTimeoutMilliseconds, getTimeoutSeconds, missing32or64, unresolved, unresolvedOffUtrace, unresolvedOn32On64, unresolvedOnIA32, unresolvedOnPPC, unresolvedOnUtrace, unresolvedOnx8664, unsupported
 
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, 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

TestArithmetics

public TestArithmetics()
Method Detail

checkScratchExpr

private void checkScratchExpr(String expr,
                              long value)

testAdd

public void testAdd()

checkVariableExpr

private void checkVariableExpr(String expr,
                               long value)

testMember

public void testMember()

testIncrement

public void testIncrement()

testDecrement

public void testDecrement()

testArrayAccess

public void testArrayAccess()

testArraySlice

public void testArraySlice()

checkErrorExpr

private void checkErrorExpr(String input,
                            String error)

testEndOfFileError

public void testEndOfFileError()

testExpressionError

public void testExpressionError()

testTokenError

public void testTokenError()

checkExprType

private void checkExprType(String expr,
                           String resultType)

testTypes

public void testTypes()