making sure the db is closed in sqlite_util_tests

This commit is contained in:
mike@arpaia.co 2014-08-30 03:07:14 -07:00
parent 2b293a9c90
commit 1ff68cabf3

View File

@ -13,7 +13,9 @@ class TestUtilTests : public testing::Test {};
TEST_F(TestUtilTests, test_expected_results) {
int err;
auto results = aggregateQuery(kTestQuery, err, createTestDB());
auto db = createTestDB();
auto results = aggregateQuery(kTestQuery, err, db);
sqlite3_close(db);
EXPECT_EQ(err, 0);
EXPECT_EQ(results, getTestDBExpectedResults());
}
@ -31,6 +33,7 @@ TEST_F(TestUtilTests, test_get_test_db_result_stream) {
}
int err_int;
auto expected = aggregateQuery(kTestQuery, err_int, db);
sqlite3_close(db);
EXPECT_EQ(expected, r.second);
}
}