mondrian.olap
Class ParserTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by mondrian.test.FoodMartTestCase
              extended by mondrian.olap.ParserTest
All Implemented Interfaces:
Test

public class ParserTest
extends FoodMartTestCase

Tests the MDX parser.

Version:
$Id: //open/mondrian/testsrc/main/mondrian/olap/ParserTest.java#46 $
Author:
gjohnson

Nested Class Summary
static class ParserTest.TestParser
           
 
Field Summary
(package private) static BuiltinFunTable funTable
           
 
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
 
Constructor Summary
ParserTest(String name)
           
 
Method Summary
 void testAsPrecedence()
          Test case for bug MONDRIAN-648, "AS operator has lower precedence than required by MDX specification".
 void testAxisParsing()
           
 void testBangFunction()
           
 void testCaseSwitch()
           
 void testCaseTest()
           
 void testCast()
           
 void testCellProperties()
           
 void testCloneQuery()
           
 void testDimensionProperties()
           
 void testEmptyExpr()
           
 void testId()
           
 void testIs()
           
 void testIsEmpty()
           
 void testIsNull()
           
 void testLargePrecision()
          Testcase for bug MONDRIAN-272, "High precision number in MDX causes overflow".
 void testMemberOnAxis()
          If an axis expression is a member, implicitly convert it to a set.
 void testMultipleAxes()
           
 void testMultiplication()
          Verifies that calculated measures made of several '*' operators can resolve them correctly.
 void testNegativeCases()
           
 void testNull()
           
 void testNumbers()
          Tests parsing of numbers.
 void testScannerPunc()
           
 void testSetExpr()
          Test case for bug MONDRIAN-306, "Parser should not require braces around range op in WITH SET".
 void testUnparse()
           
 
Methods inherited from class mondrian.test.FoodMartTestCase
allMember, assertAxisReturns, assertAxisThrows, assertBooleanExprReturns, assertExprReturns, assertExprThrows, assertQueriesReturnSimilarResults, assertQueryReturns, assertQueryThrows, assertSize, cubeByName, execute, executeExpr, executeQuery, executeSingletonAxis, genderMembersIncludingAll, getConnection, getDimensionWithName, getTestContext, getTestContext, isDefaultNullMemberRepresentation, isGroupingSetsSupported, member, productMembersPotScrubbersPotsAndPans, storeMembersCAAndOR, storeMembersUsaAndCanada, tearDown, warehouseMembersCanadaMexicoUsa
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

funTable

static final BuiltinFunTable funTable
Constructor Detail

ParserTest

public ParserTest(String name)
Method Detail

testAxisParsing

public void testAxisParsing()
                     throws Exception
Throws:
Exception

testNegativeCases

public void testNegativeCases()
                       throws Exception
Throws:
Exception

testScannerPunc

public void testScannerPunc()

testUnparse

public void testUnparse()

testMultipleAxes

public void testMultipleAxes()
                      throws Exception
Throws:
Exception

testMemberOnAxis

public void testMemberOnAxis()
If an axis expression is a member, implicitly convert it to a set.


testCaseTest

public void testCaseTest()

testCaseSwitch

public void testCaseSwitch()

testSetExpr

public void testSetExpr()
Test case for bug MONDRIAN-306, "Parser should not require braces around range op in WITH SET".


testDimensionProperties

public void testDimensionProperties()

testCellProperties

public void testCellProperties()

testIsEmpty

public void testIsEmpty()

testIs

public void testIs()

testIsNull

public void testIsNull()

testNull

public void testNull()

testCast

public void testCast()

testMultiplication

public void testMultiplication()
Verifies that calculated measures made of several '*' operators can resolve them correctly.


testBangFunction

public void testBangFunction()

testId

public void testId()

testCloneQuery

public void testCloneQuery()

testNumbers

public void testNumbers()
Tests parsing of numbers.


testLargePrecision

public void testLargePrecision()
Testcase for bug MONDRIAN-272, "High precision number in MDX causes overflow". The problem was that "5000001234" exceeded the precision of the int being used to gather the mantissa.


testEmptyExpr

public void testEmptyExpr()

testAsPrecedence

public void testAsPrecedence()
Test case for bug MONDRIAN-648, "AS operator has lower precedence than required by MDX specification".

Currently that bug is not fixed. We give the AS operator low precedence, so CAST works as it should but 'expr AS namedSet' does not.


Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads