From 531fa90cbd342ac3440fa3af5f59e0adbab29d54 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Wed, 2 Jun 2010 16:58:34 +0000 Subject: [PATCH] Fix test compilation --- tests/librarybackend_test.cpp | 7 ++++--- tests/librarymodel_test.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/librarybackend_test.cpp b/tests/librarybackend_test.cpp index 0f4045dce..4ba9b433d 100644 --- a/tests/librarybackend_test.cpp +++ b/tests/librarybackend_test.cpp @@ -34,8 +34,9 @@ class LibraryBackendTest : public ::testing::Test { protected: virtual void SetUp() { database_.reset(new MemoryDatabase); - backend_.reset(new LibraryBackend(database_.get(), Library::kSongsTable, - Library::kDirsTable, Library::kSubdirsTable)); + backend_.reset(new LibraryBackend); + backend_->Init(database_, Library::kSongsTable, + Library::kDirsTable, Library::kSubdirsTable); } Song MakeDummySong(int directory_id) { @@ -49,7 +50,7 @@ class LibraryBackendTest : public ::testing::Test { return ret; } - boost::scoped_ptr database_; + boost::shared_ptr database_; boost::scoped_ptr backend_; }; diff --git a/tests/librarymodel_test.cpp b/tests/librarymodel_test.cpp index 5bbccbcd7..92779a53c 100644 --- a/tests/librarymodel_test.cpp +++ b/tests/librarymodel_test.cpp @@ -33,8 +33,9 @@ class LibraryModelTest : public ::testing::Test { protected: void SetUp() { database_.reset(new MemoryDatabase); - backend_.reset(new LibraryBackend(database_.get(), Library::kSongsTable, - Library::kDirsTable, Library::kSubdirsTable)); + backend_.reset(new LibraryBackend()); + backend_->Init(database_, Library::kSongsTable, + Library::kDirsTable, Library::kSubdirsTable); model_.reset(new LibraryModel(backend_.get())); added_dir_ = false; @@ -68,7 +69,7 @@ class LibraryModelTest : public ::testing::Test { return AddSong(song); } - boost::scoped_ptr database_; + boost::shared_ptr database_; boost::scoped_ptr backend_; boost::scoped_ptr model_; boost::scoped_ptr model_sorted_;