summaryrefslogtreecommitdiffstats
path: root/sql/src/test/java/tests/SQLite/ExceptionTest.java
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:57 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:57 -0800
commitb7926325a1c1a370c84c81db80372f59af240a53 (patch)
treeb1d0214be443ea674d0ded8c502a8e074e50bdd2 /sql/src/test/java/tests/SQLite/ExceptionTest.java
parent687f18b91f4a0a728a027579110953ee729adcb8 (diff)
downloadlibcore-b7926325a1c1a370c84c81db80372f59af240a53.zip
libcore-b7926325a1c1a370c84c81db80372f59af240a53.tar.gz
libcore-b7926325a1c1a370c84c81db80372f59af240a53.tar.bz2
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'sql/src/test/java/tests/SQLite/ExceptionTest.java')
-rw-r--r--sql/src/test/java/tests/SQLite/ExceptionTest.java27
1 files changed, 17 insertions, 10 deletions
diff --git a/sql/src/test/java/tests/SQLite/ExceptionTest.java b/sql/src/test/java/tests/SQLite/ExceptionTest.java
index cc37c2a..fe86e8f 100644
--- a/sql/src/test/java/tests/SQLite/ExceptionTest.java
+++ b/sql/src/test/java/tests/SQLite/ExceptionTest.java
@@ -16,24 +16,26 @@
package tests.SQLite;
+import SQLite.Database;
import SQLite.Exception;
+import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestTargets;
import dalvik.annotation.TestLevel;
import dalvik.annotation.TestTargetNew;
import junit.framework.TestCase;
-public class ExceptionTest extends TestCase {
-
- public ExceptionTest(String name) {
- super(name);
- }
+@TestTargetClass(SQLite.Exception.class)
+public class ExceptionTest extends SQLiteTest {
+
+ private Database db = null;
- protected void setUp() throws java.lang.Exception {
+ public void setUp() throws java.lang.Exception {
super.setUp();
+ db = new Database();
}
-
- protected void tearDown() throws java.lang.Exception {
+
+ public void tearDown() {
super.tearDown();
}
@@ -41,13 +43,18 @@ public class ExceptionTest extends TestCase {
* @tests {@link Exception#Exception(String)}
*/
@TestTargetNew(
- level = TestLevel.TODO,
+ level = TestLevel.COMPLETE,
notes = "constructor test",
method = "Exception",
args = {java.lang.String.class}
)
public void testException() {
- fail("not yet implemented");
+ try {
+ db.open(dbFile.getName(), 0);
+ } catch (Exception e) {
+ assertNotNull(e);
+ assertNotNull(e.getMessage());
+ }
}
}