diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-08-09 12:15:09 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-08-10 08:49:18 -0700 |
commit | b500577bfa9759241b374c161a06c1bef79cf4cd (patch) | |
tree | 170d96d3a9530b16a01b0d9457870cb79787bb14 /test/storage | |
parent | 070f50d6b032942591fcc392fc4bdd72bddc31c4 (diff) | |
download | qtlocation-mapboxgl-b500577bfa9759241b374c161a06c1bef79cf4cd.tar.gz |
[android, linux] Upgrade to SQLite 3.24.0, compiled to minimize binary size
Diffstat (limited to 'test/storage')
-rw-r--r-- | test/storage/offline_database.test.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/storage/offline_database.test.cpp b/test/storage/offline_database.test.cpp index 10343ec305..000f24e1cd 100644 --- a/test/storage/offline_database.test.cpp +++ b/test/storage/offline_database.test.cpp @@ -49,8 +49,12 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(Invalid)) { #ifndef __QT__ // Only non-Qt platforms are setting a logger on the SQLite object. - EXPECT_EQ(1u, log.count({ EventSeverity::Info, Event::Database, static_cast<int64_t>(mapbox::sqlite::ResultCode::NotADB), - "statement aborts at 1: [PRAGMA user_version] file is encrypted or is not a database" }, true)); + // Checking two possibilities for the error string because it apparently changes between SQLite versions. + EXPECT_EQ(1u, + log.count({ EventSeverity::Info, Event::Database, static_cast<int64_t>(mapbox::sqlite::ResultCode::NotADB), + "statement aborts at 1: [PRAGMA user_version] file is encrypted or is not a database" }, true) + + log.count({ EventSeverity::Info, Event::Database, static_cast<int64_t>(mapbox::sqlite::ResultCode::NotADB), + "statement aborts at 1: [PRAGMA user_version] file is not a database" }, true)); #endif EXPECT_EQ(1u, log.count({ EventSeverity::Warning, Event::Database, -1, "Removing existing incompatible offline database" })); EXPECT_EQ(0u, log.uncheckedCount()); @@ -618,15 +622,15 @@ TEST(OfflineDatabase, BatchInsertionMapboxTileCountExceeded) { db.setOfflineMapboxTileCountLimit(1); OfflineRegionDefinition definition { "", LatLngBounds::world(), 0, INFINITY, 1.0 }; OfflineRegion region = db.createRegion(definition, OfflineRegionMetadata()); - + Response response; response.data = randomString(1024); std::list<std::tuple<Resource, Response>> resources; - + resources.emplace_back(Resource::style("http://example.com/"), response); resources.emplace_back(Resource::tile("mapbox://tiles/1", 1.0, 0, 0, 0, Tileset::Scheme::XYZ), response); resources.emplace_back(Resource::tile("mapbox://tiles/2", 1.0, 0, 0, 0, Tileset::Scheme::XYZ), response); - + OfflineRegionStatus status; try { db.putRegionResources(region.getID(), resources, status); @@ -634,7 +638,7 @@ TEST(OfflineDatabase, BatchInsertionMapboxTileCountExceeded) { } catch (const MapboxTileLimitExceededException&) { // Expected } - + EXPECT_EQ(status.completedTileCount, 1u); EXPECT_EQ(status.completedResourceCount, 2u); EXPECT_EQ(db.getRegionCompletedStatus(region.getID()).completedTileCount, 1u); |