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

Delta Between Two Patch Sets: test/FilterEngine.cpp

Issue 29409580: Issue 5013 - Make parameter const ref when applicable. (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Left Patch Set: Created April 11, 2017, 1:58 p.m.
Right Patch Set: the input stream is no longer const. Created April 12, 2017, 3:08 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « test/FileSystemJsObject.cpp ('k') | test/Prefs.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 }; 60 };
61 61
62 typedef FilterEngineTestGeneric<LazyFileSystem, AdblockPlus::DefaultLogSystem> FilterEngineTest; 62 typedef FilterEngineTestGeneric<LazyFileSystem, AdblockPlus::DefaultLogSystem> FilterEngineTest;
63 typedef FilterEngineTestGeneric<VeryLazyFileSystem, LazyLogSystem> FilterEngin eTestNoData; 63 typedef FilterEngineTestGeneric<VeryLazyFileSystem, LazyLogSystem> FilterEngin eTestNoData;
64 64
65 struct MockFilterChangeCallback 65 struct MockFilterChangeCallback
66 { 66 {
67 MockFilterChangeCallback(int& timesCalled) : timesCalled(timesCalled) {} 67 MockFilterChangeCallback(int& timesCalled) : timesCalled(timesCalled) {}
68 68
69 void operator()(const std::string&, const AdblockPlus::JsValuePtr) 69 void operator()(const std::string&, const AdblockPlus::JsValue&)
70 { 70 {
71 timesCalled++; 71 timesCalled++;
72 } 72 }
73 73
74 private: 74 private:
75 int& timesCalled; 75 int& timesCalled;
76 }; 76 };
77 77
78 class UpdaterTest : public ::testing::Test 78 class UpdaterTest : public ::testing::Test
79 { 79 {
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 std::string testConnection = "test connection"; 1085 std::string testConnection = "test connection";
1086 filterEngine->SetAllowedConnectionType(&testConnection); 1086 filterEngine->SetAllowedConnectionType(&testConnection);
1087 auto subscription = EnsureExampleSubscriptionAndForceUpdate("subB"); 1087 auto subscription = EnsureExampleSubscriptionAndForceUpdate("subB");
1088 EXPECT_EQ("synchronize_ok", subscription->GetProperty("downloadStatus")->AsS tring()); 1088 EXPECT_EQ("synchronize_ok", subscription->GetProperty("downloadStatus")->AsS tring());
1089 EXPECT_EQ(1u, subscription->GetProperty("filters")->AsList().size()); 1089 EXPECT_EQ(1u, subscription->GetProperty("filters")->AsList().size());
1090 auto capturedConnectionTypes = this->capturedConnectionTypes.GetStrings(); 1090 auto capturedConnectionTypes = this->capturedConnectionTypes.GetStrings();
1091 ASSERT_EQ(1u, capturedConnectionTypes.size()); 1091 ASSERT_EQ(1u, capturedConnectionTypes.size());
1092 EXPECT_TRUE(capturedConnectionTypes[0].first); 1092 EXPECT_TRUE(capturedConnectionTypes[0].first);
1093 EXPECT_EQ(testConnection, capturedConnectionTypes[0].second); 1093 EXPECT_EQ(testConnection, capturedConnectionTypes[0].second);
1094 } 1094 }
1095 } 1095 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld