Index: test/BaseJsTest.cpp |
=================================================================== |
--- a/test/BaseJsTest.cpp |
+++ b/test/BaseJsTest.cpp |
@@ -26,14 +26,14 @@ |
void BaseJsTest::SetUp() |
{ |
jsEngine = CreateJsEngine(); |
- jsEngine->SetLogSystem(AdblockPlus::LogSystemPtr(new ThrowingLogSystem)); |
- jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr(new ThrowingFileSystem)); |
- jsEngine->SetWebRequest(AdblockPlus::WebRequestPtr(new ThrowingWebRequest)); |
+ jsEngine->SetLogSystem(std::make_shared<ThrowingLogSystem>()); |
+ jsEngine->SetFileSystem(std::make_shared<ThrowingFileSystem>()); |
+ jsEngine->SetWebRequest(std::make_shared<ThrowingWebRequest>()); |
} |
void BaseJsTest::TearDown() |
{ |
ToInternal(jsEngine)->WaitForQuietScheduler(); |
+ EXPECT_EQ(1, jsEngine.use_count()); |
jsEngine.reset(); |
- EXPECT_EQ(0, jsEngine.use_count()); |
} |