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

Side by Side Diff: test/FilterEngine.cpp

Issue 29421715: Noissue - fix regression in tests (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created April 25, 2017, 8:06 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 if (aaStatus == AAStatus::enabled) 935 if (aaStatus == AAStatus::enabled)
936 EXPECT_TRUE(filterEngine->IsAAEnabled()); 936 EXPECT_TRUE(filterEngine->IsAAEnabled());
937 else 937 else
938 EXPECT_FALSE(filterEngine->IsAAEnabled()); 938 EXPECT_FALSE(filterEngine->IsAAEnabled());
939 939
940 std::unique_ptr<Subscription> aaSubscription; 940 std::unique_ptr<Subscription> aaSubscription;
941 std::unique_ptr<Subscription> otherSubscription; 941 std::unique_ptr<Subscription> otherSubscription;
942 auto subscriptions = filterEngine->GetListedSubscriptions(); 942 auto subscriptions = filterEngine->GetListedSubscriptions();
943 for (auto& subscription : subscriptions) 943 for (auto& subscription : subscriptions)
944 { 944 {
945 (subscription.IsAA() ? aaSubscription : otherSubscription) = 945 auto& dstSubscription = subscription.IsAA() ? aaSubscription : otherSubs cription;
946 std::unique_ptr<Subscription>(new Subscription(std::move(subscription) )); 946 dstSubscription.reset(new Subscription(std::move(subscription)));
947 } 947 }
948 if (otherSubscriptionsNumber == 1u) 948 if (otherSubscriptionsNumber == 1u)
949 { 949 {
950 if (isAASatusPresent(aaStatus)) 950 if (isAASatusPresent(aaStatus))
951 { 951 {
952 EXPECT_EQ(2u, subscriptions.size()); 952 EXPECT_EQ(2u, subscriptions.size());
953 EXPECT_TRUE(aaSubscription); 953 EXPECT_TRUE(aaSubscription);
954 EXPECT_TRUE(otherSubscription); 954 EXPECT_TRUE(otherSubscription);
955 } 955 }
956 else 956 else
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 filterEngine->SetAllowedConnectionType(&testConnection); 1088 filterEngine->SetAllowedConnectionType(&testConnection);
1089 auto subscription = EnsureExampleSubscriptionAndForceUpdate("subB"); 1089 auto subscription = EnsureExampleSubscriptionAndForceUpdate("subB");
1090 EXPECT_EQ("synchronize_ok", subscription.GetProperty("downloadStatus").AsStr ing()); 1090 EXPECT_EQ("synchronize_ok", subscription.GetProperty("downloadStatus").AsStr ing());
1091 EXPECT_EQ(1u, subscription.GetProperty("filters").AsList().size()); 1091 EXPECT_EQ(1u, subscription.GetProperty("filters").AsList().size());
1092 auto capturedConnectionTypes = this->capturedConnectionTypes.GetStrings(); 1092 auto capturedConnectionTypes = this->capturedConnectionTypes.GetStrings();
1093 ASSERT_EQ(1u, capturedConnectionTypes.size()); 1093 ASSERT_EQ(1u, capturedConnectionTypes.size());
1094 EXPECT_TRUE(capturedConnectionTypes[0].first); 1094 EXPECT_TRUE(capturedConnectionTypes[0].first);
1095 EXPECT_EQ(testConnection, capturedConnectionTypes[0].second); 1095 EXPECT_EQ(testConnection, capturedConnectionTypes[0].second);
1096 } 1096 }
1097 } 1097 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld