Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/Prefs.cpp

Issue 29449592: Issue 5183 - Provide async interface for FileSystem (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Rebase on master. Last changes. Created July 7, 2017, 1:36 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/JsEngine.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Prefs.cpp
===================================================================
--- a/test/Prefs.cpp
+++ b/test/Prefs.cpp
@@ -135,27 +135,27 @@
ASSERT_EQ("filters.ini", filterEngine->GetPref("patternsfile").AsString());
ASSERT_EQ(48, filterEngine->GetPref("patternsbackupinterval").AsInt());
ASSERT_FALSE(filterEngine->GetPref("subscriptions_autoupdate").AsBool());
}
}
TEST_F(PrefsTest, UnknownPrefs)
{
- using IOBuffer = AdblockPlus::FileSystem::IOBuffer;
+ using IOBuffer = AdblockPlus::IFileSystem::IOBuffer;
std::string content = "{\"foobar\":2, \"patternsbackupinterval\": 12}";
fileSystem->prefsContents = IOBuffer(content.cbegin(), content.cend());
auto filterEngine = CreateFilterEngine();
ASSERT_TRUE(filterEngine->GetPref("foobar").IsUndefined());
ASSERT_EQ(12, filterEngine->GetPref("patternsbackupinterval").AsInt());
}
TEST_F(PrefsTest, SyntaxFailure)
{
- using IOBuffer = AdblockPlus::FileSystem::IOBuffer;
+ using IOBuffer = AdblockPlus::IFileSystem::IOBuffer;
std::string content = "{\"patternsbackupinterval\": 6, \"foo\"}";
fileSystem->prefsContents = IOBuffer(content.cbegin(), content.cend());
auto filterEngine = CreateFilterEngine();
ASSERT_EQ(24, filterEngine->GetPref("patternsbackupinterval").AsInt());
}
TEST_F(PrefsTest, PreconfiguredPrefsPreconfigured)
« no previous file with comments | « test/JsEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld