|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.derbyTesting.junit.BaseTestCase
org.apache.derbyTesting.junit.BaseJDBCTestCase
org.apache.derbyTesting.functionTests.tests.lang.ArithmeticTest
public class ArithmeticTest
Test case for arithmetic.sql. It tests the arithmetic operators.
| Field Summary |
|---|
| Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE |
| Constructor Summary | |
|---|---|
ArithmeticTest(java.lang.String name)
|
|
| Method Summary | |
|---|---|
private void |
doBasically(java.lang.String tableName,
java.lang.String type,
long positiveBoundary)
Test basic arithmetic operations. |
private void |
doMixedTypeImpl(java.lang.String tableName,
java.lang.String type,
int i)
Test mixed types.i.e. int and bigint, or int and smallint. |
private void |
doOverflow(java.lang.String tableName,
java.lang.String type,
long positiveBoundary)
Test overflow on some types. |
static junit.framework.Test |
suite()
|
void |
testMixedType()
Test mixed types.i.e. int and bigint, or int and smallint. |
void |
testNumericDataType()
Arithmetic on a numeric data type. |
void |
testPrecedenceAndAssociativity()
|
void |
testTypes()
Test arithmetic on different types. |
void |
testWrongType()
Test the arithmetic operators on a type we know they don't work on. |
| Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArithmeticTest(java.lang.String name)
| Method Detail |
|---|
public static junit.framework.Test suite()
public void testTypes()
throws java.sql.SQLException
java.sql.SQLException
private void doBasically(java.lang.String tableName,
java.lang.String type,
long positiveBoundary)
throws java.sql.SQLException
tableName - the name of table to test.
If a table with the same name has existed,
it will be dropped.type - the type to test. i.e. "smallint" or "bigint".positiveBoundary - for "smallint", it's 32767; for "bigint", it's 9223372036854775807.
java.sql.SQLException
private void doOverflow(java.lang.String tableName,
java.lang.String type,
long positiveBoundary)
throws java.sql.SQLException
tableName - the name of table to test.
If a table with the same name has existed,
it will be dropped.type - the type to test. i.e. "smallint" or "bigint".positiveBoundary - for "smallint", it's 32767; for "bigint", it's 9223372036854775807.
java.sql.SQLException
private void doMixedTypeImpl(java.lang.String tableName,
java.lang.String type,
int i)
throws java.sql.SQLException
tableName - the name of table to test.type - the type to test. i.e. "smallint" or "bigint".i - an integer number to test with.
java.sql.SQLException
public void testMixedType()
throws java.sql.SQLException
java.sql.SQLException
public void testWrongType()
throws java.sql.SQLException
java.sql.SQLException
public void testNumericDataType()
throws java.sql.SQLException
java.sql.SQLException
public void testPrecedenceAndAssociativity()
throws java.sql.SQLException
java.sql.SQLException
|
Built on Sat 2009-11-28 18:44:18-0800, from revision 885187 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||