diff options
author | Vasu Nori <vnori@google.com> | 2010-01-27 12:10:56 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-01-27 12:10:56 -0800 |
commit | 445cc0e4bfd5b9460fb1cdccd22d8d54a49e5da1 (patch) | |
tree | 2749bea59f5f5746e54df16e82b593f6e15fea43 /tests | |
parent | 946e007283d76d6855824ed00910fb1470d369c2 (diff) | |
parent | ad8d0d1b4d4b8cde73c30e9facad6514e492bf11 (diff) | |
download | frameworks_base-445cc0e4bfd5b9460fb1cdccd22d8d54a49e5da1.zip frameworks_base-445cc0e4bfd5b9460fb1cdccd22d8d54a49e5da1.tar.gz frameworks_base-445cc0e4bfd5b9460fb1cdccd22d8d54a49e5da1.tar.bz2 |
Merge "dont use sqlite_stmt_journals dir"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/AndroidTests/src/com/android/unit_tests/DatabaseGeneralTest.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/AndroidTests/src/com/android/unit_tests/DatabaseGeneralTest.java b/tests/AndroidTests/src/com/android/unit_tests/DatabaseGeneralTest.java index 69d55c1..d7dd601 100644 --- a/tests/AndroidTests/src/com/android/unit_tests/DatabaseGeneralTest.java +++ b/tests/AndroidTests/src/com/android/unit_tests/DatabaseGeneralTest.java @@ -17,14 +17,17 @@ package com.android.unit_tests; import android.content.ContentValues; +import android.content.Context; import android.database.ContentObserver; import android.database.Cursor; import android.database.DatabaseUtils; import android.database.CharArrayBuffer; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; +import android.os.Environment; import android.os.Handler; import android.os.Parcel; +import android.test.AndroidTestCase; import android.test.PerformanceTestCase; import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.SmallTest; @@ -41,7 +44,7 @@ import junit.framework.TestCase; import static android.database.DatabaseUtils.InsertHelper.TABLE_INFO_PRAGMA_COLUMNNAME_INDEX; import static android.database.DatabaseUtils.InsertHelper.TABLE_INFO_PRAGMA_DEFAULT_INDEX; -public class DatabaseGeneralTest extends TestCase implements PerformanceTestCase { +public class DatabaseGeneralTest extends AndroidTestCase implements PerformanceTestCase { private static final String sString1 = "this is a test"; private static final String sString2 = "and yet another test"; @@ -55,7 +58,8 @@ public class DatabaseGeneralTest extends TestCase implements PerformanceTestCase @Override protected void setUp() throws Exception { super.setUp(); - mDatabaseFile = new File("/sqlite_stmt_journals", "database_test.db"); + File dbDir = getContext().getDir(this.getClass().getName(), Context.MODE_PRIVATE); + mDatabaseFile = new File(dbDir, "database_test.db"); if (mDatabaseFile.exists()) { mDatabaseFile.delete(); } |