Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -64,26 +64,26 @@ class Fake : public FakeInterface {
|
||||
|
||||
// Proxies for the test interface.
|
||||
BEGIN_PROXY_MAP(Fake)
|
||||
PROXY_WORKER_THREAD_DESTRUCTOR()
|
||||
PROXY_METHOD0(void, VoidMethod0)
|
||||
PROXY_METHOD0(std::string, Method0)
|
||||
PROXY_CONSTMETHOD0(std::string, ConstMethod0)
|
||||
PROXY_WORKER_METHOD1(std::string, Method1, std::string)
|
||||
PROXY_CONSTMETHOD1(std::string, ConstMethod1, std::string)
|
||||
PROXY_WORKER_METHOD2(std::string, Method2, std::string, std::string)
|
||||
PROXY_WORKER_THREAD_DESTRUCTOR()
|
||||
PROXY_METHOD0(void, VoidMethod0)
|
||||
PROXY_METHOD0(std::string, Method0)
|
||||
PROXY_CONSTMETHOD0(std::string, ConstMethod0)
|
||||
PROXY_WORKER_METHOD1(std::string, Method1, std::string)
|
||||
PROXY_CONSTMETHOD1(std::string, ConstMethod1, std::string)
|
||||
PROXY_WORKER_METHOD2(std::string, Method2, std::string, std::string)
|
||||
END_PROXY_MAP()
|
||||
|
||||
// Preprocessor hack to get a proxy class a name different than FakeProxy.
|
||||
#define FakeProxy FakeSignalingProxy
|
||||
#define FakeProxyWithInternal FakeSignalingProxyWithInternal
|
||||
BEGIN_SIGNALING_PROXY_MAP(Fake)
|
||||
PROXY_SIGNALING_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)
|
||||
PROXY_SIGNALING_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()
|
||||
#undef FakeProxy
|
||||
|
||||
@ -215,21 +215,17 @@ TEST_F(ProxyTest, VoidMethod0) {
|
||||
TEST_F(ProxyTest, Method0) {
|
||||
EXPECT_CALL(*fake_, Method0())
|
||||
.Times(Exactly(1))
|
||||
.WillOnce(
|
||||
DoAll(InvokeWithoutArgs(this, &ProxyTest::CheckSignalingThread),
|
||||
Return("Method0")));
|
||||
EXPECT_EQ("Method0",
|
||||
fake_proxy_->Method0());
|
||||
.WillOnce(DoAll(InvokeWithoutArgs(this, &ProxyTest::CheckSignalingThread),
|
||||
Return("Method0")));
|
||||
EXPECT_EQ("Method0", fake_proxy_->Method0());
|
||||
}
|
||||
|
||||
TEST_F(ProxyTest, ConstMethod0) {
|
||||
EXPECT_CALL(*fake_, ConstMethod0())
|
||||
.Times(Exactly(1))
|
||||
.WillOnce(
|
||||
DoAll(InvokeWithoutArgs(this, &ProxyTest::CheckSignalingThread),
|
||||
Return("ConstMethod0")));
|
||||
EXPECT_EQ("ConstMethod0",
|
||||
fake_proxy_->ConstMethod0());
|
||||
.WillOnce(DoAll(InvokeWithoutArgs(this, &ProxyTest::CheckSignalingThread),
|
||||
Return("ConstMethod0")));
|
||||
EXPECT_EQ("ConstMethod0", fake_proxy_->ConstMethod0());
|
||||
}
|
||||
|
||||
TEST_F(ProxyTest, WorkerMethod1) {
|
||||
@ -245,9 +241,8 @@ TEST_F(ProxyTest, ConstMethod1) {
|
||||
const std::string arg1 = "arg1";
|
||||
EXPECT_CALL(*fake_, ConstMethod1(arg1))
|
||||
.Times(Exactly(1))
|
||||
.WillOnce(
|
||||
DoAll(InvokeWithoutArgs(this, &ProxyTest::CheckSignalingThread),
|
||||
Return("ConstMethod1")));
|
||||
.WillOnce(DoAll(InvokeWithoutArgs(this, &ProxyTest::CheckSignalingThread),
|
||||
Return("ConstMethod1")));
|
||||
EXPECT_EQ("ConstMethod1", fake_proxy_->ConstMethod1(arg1));
|
||||
}
|
||||
|
||||
@ -275,8 +270,8 @@ class Foo : public FooInterface {
|
||||
};
|
||||
|
||||
BEGIN_OWNED_PROXY_MAP(Foo)
|
||||
PROXY_SIGNALING_THREAD_DESTRUCTOR()
|
||||
PROXY_METHOD0(void, Bar)
|
||||
PROXY_SIGNALING_THREAD_DESTRUCTOR()
|
||||
PROXY_METHOD0(void, Bar)
|
||||
END_PROXY_MAP()
|
||||
|
||||
class OwnedProxyTest : public testing::Test {
|
||||
|
Reference in New Issue
Block a user