org.eigenbase.sql.test
Class SqlPrettyWriterTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.eigenbase.sql.test.SqlPrettyWriterTest
- All Implemented Interfaces:
- Test
public class SqlPrettyWriterTest
- extends TestCase
Unit test for SqlPrettyWriter
.
You must provide the system property "source.dir".
- Since:
- 2005/8/24
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/test/SqlPrettyWriterTest.java#14 $
- Author:
- Julian Hyde
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, failNotEquals, failNotSame, failSame, format |
NL
public static final String NL
SqlPrettyWriterTest
public SqlPrettyWriterTest(String testCaseName)
throws Exception
- Throws:
Exception
getDiffRepos
protected DiffRepository getDiffRepos()
parseQuery
protected SqlNode parseQuery(String sql)
- Parses a SQL query. To use a different parser, override this method.
assertPrintsTo
protected void assertPrintsTo(boolean newlines,
String sql,
String expected)
assertExprPrintsTo
protected void assertExprPrintsTo(boolean newlines,
String sql,
String expected)
checkSimple
protected void checkSimple(SqlPrettyWriter prettyWriter,
String expectedDesc,
String expected)
throws Exception
- Throws:
Exception
testDefault
public void testDefault()
throws Exception
- Throws:
Exception
testIndent8
public void testIndent8()
throws Exception
- Throws:
Exception
testClausesNotOnNewLine
public void testClausesNotOnNewLine()
throws Exception
- Throws:
Exception
testSelectListItemsOnSeparateLines
public void testSelectListItemsOnSeparateLines()
throws Exception
- Throws:
Exception
testSelectListExtraIndentFlag
public void testSelectListExtraIndentFlag()
throws Exception
- Throws:
Exception
testKeywordsLowerCase
public void testKeywordsLowerCase()
throws Exception
- Throws:
Exception
testParenthesizeAllExprs
public void testParenthesizeAllExprs()
throws Exception
- Throws:
Exception
testOnlyQuoteIdentifiersWhichNeedIt
public void testOnlyQuoteIdentifiersWhichNeedIt()
throws Exception
- Throws:
Exception
testDamiansSubqueryStyle
public void testDamiansSubqueryStyle()
throws Exception
- Throws:
Exception
_testExplain
public void _testExplain()
testCase
public void testCase()
testCase2
public void testCase2()
testBetween
public void testBetween()
testCast
public void testCast()
testLiteralChain
public void testLiteralChain()
testOverlaps
public void testOverlaps()
testUnion
public void testUnion()
testMultiset
public void testMultiset()
testInnerJoin
public void testInnerJoin()
testWhereListItemsOnSeparateLinesOr
public void testWhereListItemsOnSeparateLinesOr()
throws Exception
- Throws:
Exception
testWhereListItemsOnSeparateLinesAnd
public void testWhereListItemsOnSeparateLinesAnd()
throws Exception
- Throws:
Exception
checkPrettySeparateLines
private void checkPrettySeparateLines(String sql)