Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix a broken test case in DatabaseUtilsTest.java. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | e4878173ae4ec9214bd3af1795189c97 |
User & Date: | dan 2017-11-28 18:16:46 |
Context
2018-01-22
| ||
18:59 | Upgrade this project to version 3.22.0. check-in: 1dfc539feb user: dan tags: trunk | |
2017-11-28
| ||
18:16 | Fix a broken test case in DatabaseUtilsTest.java. check-in: e4878173ae user: dan tags: trunk | |
17:05 | Update some other files to better match stock Android. check-in: 253313a7ee user: dan tags: trunk | |
Changes
Changes to sqlite3/src/androidTest/java/org/sqlite/database/database_cts/DatabaseUtilsTest.java.
279 279 null, null, null, null, null); 280 280 assertNotNull(cursor); 281 281 282 282 contentValues = new ContentValues(); 283 283 cursor.moveToNext(); 284 284 DatabaseUtils.cursorRowToContentValues(cursor, contentValues); 285 285 assertFalse(contentValues.getAsBoolean("value")); 286 + assertTrue(contentValues.getAsInteger("value")==0); 286 287 cursor.moveToNext(); 287 288 DatabaseUtils.cursorRowToContentValues(cursor, contentValues); 288 - assertTrue(contentValues.getAsBoolean("value")); 289 + assertTrue(contentValues.getAsInteger("value")==1); 290 + 291 + // The following does not work: 292 + // https://stackoverflow.com/questions/13095277/android-database-with-contentvalue-with-boolean-bug 293 + // assertTrue(contentValues.getAsBoolean("value")); 289 294 } 290 295 291 296 public void testCursorStringToContentValues() { 292 297 mDatabase.execSQL("INSERT INTO " + TABLE_NAME + " (name, age, address)" + 293 298 " VALUES ('Mike', '20', 'LA');"); 294 299 Cursor cursor = mDatabase.query(TABLE_NAME, TEST_PROJECTION, 295 300 null, null, null, null, null);