Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Unified Diff: webrtc/base/sigslot_unittest.cc

Issue 2854053002: Revert of Fixing sigslot copy constructors. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/sigslot.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/sigslot_unittest.cc
diff --git a/webrtc/base/sigslot_unittest.cc b/webrtc/base/sigslot_unittest.cc
index e860fe33736da248646b40e475d92ccdf9b7d351..cb773363101b93e3f0ee05f3c3208ddbc7a69cea 100644
--- a/webrtc/base/sigslot_unittest.cc
+++ b/webrtc/base/sigslot_unittest.cc
@@ -36,10 +36,6 @@
~SigslotReceiver() {
}
- // Provide copy constructor so that tests can exercise the has_slots copy
- // constructor.
- SigslotReceiver(const SigslotReceiver&) = default;
-
void Connect(sigslot::signal0<signal_policy>* signal) {
if (!signal) return;
Disconnect();
@@ -226,7 +222,7 @@
}
// Destroy signal and slot in different orders.
-TEST(SigslotDestructionOrder, SignalFirst) {
+TEST(DestructionOrder, SignalFirst) {
sigslot::signal0<>* signal = new sigslot::signal0<>;
SigslotReceiver<>* receiver = new SigslotReceiver<>();
receiver->Connect(signal);
@@ -236,7 +232,7 @@
delete receiver;
}
-TEST(SigslotDestructionOrder, SlotFirst) {
+TEST(DestructionOrder, SlotFirst) {
sigslot::signal0<>* signal = new sigslot::signal0<>;
SigslotReceiver<>* receiver = new SigslotReceiver<>();
receiver->Connect(signal);
@@ -247,28 +243,3 @@
(*signal)();
delete signal;
}
-
-// Test that if a signal is copied, its slot connections are copied as well.
-TEST(SigslotTest, CopyConnectedSignal) {
- sigslot::signal<> signal;
- SigslotReceiver<> receiver;
- receiver.Connect(&signal);
-
- // Fire the copied signal, expecting the receiver to be notified.
- sigslot::signal<> copied_signal(signal);
- copied_signal();
- EXPECT_EQ(1, receiver.signal_count());
-}
-
-// Test that if a slot is copied, its signal connections are copied as well.
-TEST(SigslotTest, CopyConnectedSlot) {
- sigslot::signal<> signal;
- SigslotReceiver<> receiver;
- receiver.Connect(&signal);
-
- // Fire the signal after copying the receiver, expecting the copied receiver
- // to be notified.
- SigslotReceiver<> copied_receiver(receiver);
- signal();
- EXPECT_EQ(1, copied_receiver.signal_count());
-}
« no previous file with comments | « webrtc/base/sigslot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698