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:
@ -42,28 +42,27 @@ class RTCChildStats : public RTCStats {
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCChildStats(const std::string& id, int64_t timestamp_us)
|
||||
: RTCStats(id, timestamp_us),
|
||||
child_int("childInt") {}
|
||||
: RTCStats(id, timestamp_us), child_int("childInt") {}
|
||||
|
||||
RTCStatsMember<int32_t> child_int;
|
||||
};
|
||||
|
||||
WEBRTC_RTCSTATS_IMPL(RTCChildStats, RTCStats, "child-stats",
|
||||
&child_int);
|
||||
WEBRTC_RTCSTATS_IMPL(RTCChildStats, RTCStats, "child-stats", &child_int);
|
||||
|
||||
class RTCGrandChildStats : public RTCChildStats {
|
||||
public:
|
||||
WEBRTC_RTCSTATS_DECL();
|
||||
|
||||
RTCGrandChildStats(const std::string& id, int64_t timestamp_us)
|
||||
: RTCChildStats(id, timestamp_us),
|
||||
grandchild_int("grandchildInt") {}
|
||||
: RTCChildStats(id, timestamp_us), grandchild_int("grandchildInt") {}
|
||||
|
||||
RTCStatsMember<int32_t> grandchild_int;
|
||||
};
|
||||
|
||||
WEBRTC_RTCSTATS_IMPL(RTCGrandChildStats, RTCChildStats, "grandchild-stats",
|
||||
&grandchild_int);
|
||||
WEBRTC_RTCSTATS_IMPL(RTCGrandChildStats,
|
||||
RTCChildStats,
|
||||
"grandchild-stats",
|
||||
&grandchild_int);
|
||||
|
||||
TEST(RTCStatsTest, RTCStatsAndMembers) {
|
||||
RTCTestStats stats("testId", 42);
|
||||
@ -123,7 +122,7 @@ TEST(RTCStatsTest, RTCStatsAndMembers) {
|
||||
EXPECT_EQ(*stats.m_sequence_double, sequence_double);
|
||||
EXPECT_EQ(*stats.m_sequence_string, sequence_string);
|
||||
|
||||
int32_t numbers[] = { 4, 8, 15, 16, 23, 42 };
|
||||
int32_t numbers[] = {4, 8, 15, 16, 23, 42};
|
||||
std::vector<int32_t> numbers_sequence(&numbers[0], &numbers[6]);
|
||||
stats.m_sequence_int32->clear();
|
||||
stats.m_sequence_int32->insert(stats.m_sequence_int32->end(),
|
||||
@ -156,11 +155,11 @@ TEST(RTCStatsTest, EqualityOperator) {
|
||||
EXPECT_NE(stats_with_all_values.m_int32, stats_with_all_values.m_uint32);
|
||||
|
||||
RTCTestStats one_member_different[] = {
|
||||
stats_with_all_values, stats_with_all_values, stats_with_all_values,
|
||||
stats_with_all_values, stats_with_all_values, stats_with_all_values,
|
||||
stats_with_all_values, stats_with_all_values, stats_with_all_values,
|
||||
stats_with_all_values, stats_with_all_values, stats_with_all_values,
|
||||
stats_with_all_values, stats_with_all_values,
|
||||
stats_with_all_values, stats_with_all_values, stats_with_all_values,
|
||||
stats_with_all_values, stats_with_all_values, stats_with_all_values,
|
||||
stats_with_all_values, stats_with_all_values, stats_with_all_values,
|
||||
stats_with_all_values, stats_with_all_values, stats_with_all_values,
|
||||
stats_with_all_values, stats_with_all_values,
|
||||
};
|
||||
for (size_t i = 0; i < 14; ++i) {
|
||||
EXPECT_EQ(stats_with_all_values, one_member_different[i]);
|
||||
|
||||
Reference in New Issue
Block a user