org.basex.test.query
Class ASTTest

java.lang.Object
  extended by org.basex.test.query.ASTTest

public final class ASTTest
extends java.lang.Object

JUnit Test class.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Tim Petrowsky

Constructor Summary
ASTTest()
           
 
Method Summary
 void allNamesBug()
          Test for wildcard matching.
 void attributesBug()
          Test for attribute axis.
 void comparisonBug()
          Test for comparing text nodes with numbers.
 void comparisonTest()
          Test for comparison.
 void descOrSelfBug()
          Test for descendant-or-self axis.
 void docNodeNotReturned()
          Test for doc node not returned on child step from doc node.
 void docNodeReturned1()
          Test for doc node returned on '/' query.
 void docNodeReturned2()
          Test for doc node returned on '/.' query.
 void docNodeReturned3()
          Test for doc node contained in ancestor axis.
 void dotSlashBug1()
          Test for './.' bug.
 void dotSlashBug2()
          Test for './/.' bug.
 void dotSlashBug3()
          Test for './/a' bug.
 void dotSlashBug4()
          Test for './' not allowed.
 void dotSlashBug5()
          Test for 'a/' not allowed.
 void doubleSlashBug1()
          Test for '//' not recognized as valid.
 void doubleSlashBug2()
          Test for '//' not recognized as valid.
 void doubleSlashBug3()
          Test for 'count(//)' not recognized as valid.
 void functionCallTest()
          Test a function.
static void initData()
          Initialize XML Storage for tests.
 void multipleSlashesBug1()
          Test for '///' not recognized as valid.
 void multipleSlashesBug2()
          Test for '////' not recognized as valid.
 void nameOnlyBug()
          Test for 'a[b]' bug.
 void nameResolvingBug()
          Test for basic name resolving.
static void tearDown()
          Delete the test-database.
 void testBasic()
          Test for doc node returned on '/' query.
 void unfinishedPredicateBug()
          Test for 'a[b' throwing ParsingException, not Errors.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTTest

public ASTTest()
Method Detail

initData

public static void initData()
                     throws java.lang.Exception
Initialize XML Storage for tests.

Throws:
java.lang.Exception - exception

testBasic

public void testBasic()
               throws QueryException
Test for doc node returned on '/' query.

Throws:
QueryException - query exception

docNodeReturned1

public void docNodeReturned1()
                      throws QueryException
Test for doc node returned on '/' query.

Throws:
QueryException - query exception

docNodeReturned2

public void docNodeReturned2()
                      throws QueryException
Test for doc node returned on '/.' query.

Throws:
QueryException - query exception

docNodeReturned3

public void docNodeReturned3()
                      throws QueryException
Test for doc node contained in ancestor axis.

Throws:
QueryException - query exception

docNodeNotReturned

public void docNodeNotReturned()
                        throws QueryException
Test for doc node not returned on child step from doc node.

Throws:
QueryException - query exception

nameResolvingBug

public void nameResolvingBug()
                      throws QueryException
Test for basic name resolving.

Throws:
QueryException - query exception

allNamesBug

public void allNamesBug()
                 throws QueryException
Test for wildcard matching.

Throws:
QueryException - query exception

attributesBug

public void attributesBug()
                   throws QueryException
Test for attribute axis.

Throws:
QueryException - query exception

descOrSelfBug

public void descOrSelfBug()
                   throws QueryException
Test for descendant-or-self axis.

Throws:
QueryException - query exception

multipleSlashesBug1

public void multipleSlashesBug1()
                         throws QueryException
Test for '///' not recognized as valid.

Throws:
QueryException - query exception

multipleSlashesBug2

public void multipleSlashesBug2()
                         throws QueryException
Test for '////' not recognized as valid.

Throws:
QueryException - exception

doubleSlashBug2

public void doubleSlashBug2()
                     throws QueryException
Test for '//' not recognized as valid.

Throws:
QueryException - exception

doubleSlashBug3

public void doubleSlashBug3()
                     throws QueryException
Test for 'count(//)' not recognized as valid.

Throws:
QueryException - exception

doubleSlashBug1

public void doubleSlashBug1()
                     throws QueryException
Test for '//' not recognized as valid.

Throws:
QueryException - exception

dotSlashBug1

public void dotSlashBug1()
                  throws QueryException
Test for './.' bug.

Throws:
QueryException - exception

dotSlashBug2

public void dotSlashBug2()
                  throws QueryException
Test for './/.' bug.

Throws:
QueryException - exception

dotSlashBug3

public void dotSlashBug3()
                  throws QueryException
Test for './/a' bug.

Throws:
QueryException - exception

dotSlashBug4

public void dotSlashBug4()
                  throws QueryException
Test for './' not allowed.

Throws:
QueryException - exception

dotSlashBug5

public void dotSlashBug5()
                  throws QueryException
Test for 'a/' not allowed.

Throws:
QueryException - exception

nameOnlyBug

public void nameOnlyBug()
                 throws QueryException
Test for 'a[b]' bug.

Throws:
QueryException - exception

unfinishedPredicateBug

public void unfinishedPredicateBug()
                            throws QueryException
Test for 'a[b' throwing ParsingException, not Errors.

Throws:
QueryException - exception

comparisonBug

public void comparisonBug()
                   throws QueryException
Test for comparing text nodes with numbers.

Throws:
QueryException - exception

functionCallTest

public void functionCallTest()
                      throws QueryException
Test a function.

Throws:
QueryException - exception

comparisonTest

public void comparisonTest()
                    throws QueryException
Test for comparison.

Throws:
QueryException - exception

tearDown

public static void tearDown()
Delete the test-database.