/* * Copyright 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
// Implementation of the test interface. class Fake : public FakeInterface { public: static rtc::scoped_refptr<Fake> Create() { return rtc::make_ref_counted<Fake>();
} // Used to verify destructor is called on the correct thread.
MOCK_METHOD(void, Destroy, ());
// Proxies for the test interface.
BEGIN_PROXY_MAP(Fake)
PROXY_SECONDARY_THREAD_DESTRUCTOR()
PROXY_METHOD0(void, VoidMethod0)
PROXY_METHOD0(std::string, Method0)
PROXY_CONSTMETHOD0(std::string, ConstMethod0)
PROXY_SECONDARY_METHOD1(std::string, Method1, std::string)
PROXY_CONSTMETHOD1(std::string, ConstMethod1, std::string)
PROXY_SECONDARY_METHOD2(std::string, Method2, std::string, std::string)
END_PROXY_MAP(Fake)
// Preprocessor hack to get a proxy class a name different than FakeProxy. #define FakeProxy FakeSignalingProxy #define FakeProxyWithInternal FakeSignalingProxyWithInternal
BEGIN_PRIMARY_PROXY_MAP(Fake)
PROXY_PRIMARY_THREAD_DESTRUCTOR()
PROXY_METHOD0(void, VoidMethod0)
PROXY_METHOD0(std::string, Method0)
PROXY_CONSTMETHOD0(std::string, ConstMethod0)
PROXY_METHOD1(std::string, Method1, std::string)
PROXY_CONSTMETHOD1(std::string, ConstMethod1, std::string)
PROXY_METHOD2(std::string, Method2, std::string, std::string)
END_PROXY_MAP(Fake) #undef FakeProxy
class SignalingProxyTest : public ::testing::Test { public: // Checks that the functions are called on the right thread. void CheckSignalingThread() { EXPECT_TRUE(signaling_thread_->IsCurrent()); }
class ProxyTest : public ::testing::Test { public: // Checks that the functions are called on the right thread. void CheckSignalingThread() { EXPECT_TRUE(signaling_thread_->IsCurrent()); } void CheckWorkerThread() { EXPECT_TRUE(worker_thread_->IsCurrent()); }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.