OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2006 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 size_t count; | 139 size_t count; |
140 size_t sec_count; | 140 size_t sec_count; |
141 double sum; | 141 double sum; |
142 double sum_sq; | 142 double sum_sq; |
143 uint32_t samples; | 143 uint32_t samples; |
144 }; | 144 }; |
145 | 145 |
146 class VirtualSocketServerTest : public testing::Test { | 146 class VirtualSocketServerTest : public testing::Test { |
147 public: | 147 public: |
148 VirtualSocketServerTest() | 148 VirtualSocketServerTest() |
149 : ss_(nullptr), | 149 : thread_(&ss_), |
150 thread_(&ss_), | |
151 kIPv4AnyAddress(IPAddress(INADDR_ANY), 0), | 150 kIPv4AnyAddress(IPAddress(INADDR_ANY), 0), |
152 kIPv6AnyAddress(IPAddress(in6addr_any), 0) {} | 151 kIPv6AnyAddress(IPAddress(in6addr_any), 0) {} |
153 | 152 |
154 void CheckPortIncrementalization(const SocketAddress& post, | 153 void CheckPortIncrementalization(const SocketAddress& post, |
155 const SocketAddress& pre) { | 154 const SocketAddress& pre) { |
156 EXPECT_EQ(post.port(), pre.port() + 1); | 155 EXPECT_EQ(post.port(), pre.port() + 1); |
157 IPAddress post_ip = post.ipaddr(); | 156 IPAddress post_ip = post.ipaddr(); |
158 IPAddress pre_ip = pre.ipaddr(); | 157 IPAddress pre_ip = pre.ipaddr(); |
159 EXPECT_EQ(pre_ip.family(), post_ip.family()); | 158 EXPECT_EQ(pre_ip.family(), post_ip.family()); |
160 if (post_ip.family() == AF_INET) { | 159 if (post_ip.family() == AF_INET) { |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 << " N=" << kTestSamples[sidx]; | 1122 << " N=" << kTestSamples[sidx]; |
1124 EXPECT_NEAR(kStdDev, stddev, 0.1 * kStdDev) | 1123 EXPECT_NEAR(kStdDev, stddev, 0.1 * kStdDev) |
1125 << "M=" << kTestMean[midx] | 1124 << "M=" << kTestMean[midx] |
1126 << " SD=" << kStdDev | 1125 << " SD=" << kStdDev |
1127 << " N=" << kTestSamples[sidx]; | 1126 << " N=" << kTestSamples[sidx]; |
1128 delete f; | 1127 delete f; |
1129 } | 1128 } |
1130 } | 1129 } |
1131 } | 1130 } |
1132 } | 1131 } |
OLD | NEW |