| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 EXPECT_TRUE(client.CheckNextPacket("foo", 3, &from)); | 49 EXPECT_TRUE(client.CheckNextPacket("foo", 3, &from)); |
| 50 EXPECT_EQ(from, server.address()); | 50 EXPECT_EQ(from, server.address()); |
| 51 EXPECT_TRUE(client.CheckNoPacket()); | 51 EXPECT_TRUE(client.CheckNoPacket()); |
| 52 } | 52 } |
| 53 | 53 |
| 54 // Tests whether the TestClient can send UDP to itself. | 54 // Tests whether the TestClient can send UDP to itself. |
| 55 TEST(TestClientTest, TestUdpIPv4) { | 55 TEST(TestClientTest, TestUdpIPv4) { |
| 56 TestUdpInternal(SocketAddress("127.0.0.1", 0)); | 56 TestUdpInternal(SocketAddress("127.0.0.1", 0)); |
| 57 } | 57 } |
| 58 | 58 |
| 59 TEST(TestClientTest, TestUdpIPv6) { | 59 #if defined(WEBRTC_LINUX) |
| 60 #define MAYBE_TestUdpIPv6 DISABLED_TestUdpIPv6 |
| 61 #else |
| 62 #define MAYBE_TestUdpIPv6 TestUdpIPv6 |
| 63 #endif |
| 64 TEST(TestClientTest, MAYBE_TestUdpIPv6) { |
| 60 if (HasIPv6Enabled()) { | 65 if (HasIPv6Enabled()) { |
| 61 TestUdpInternal(SocketAddress("::1", 0)); | 66 TestUdpInternal(SocketAddress("::1", 0)); |
| 62 } else { | 67 } else { |
| 63 LOG(LS_INFO) << "Skipping IPv6 test."; | 68 LOG(LS_INFO) << "Skipping IPv6 test."; |
| 64 } | 69 } |
| 65 } | 70 } |
| 66 | 71 |
| 67 // Tests whether the TestClient can connect to a server and exchange data. | 72 // Tests whether the TestClient can connect to a server and exchange data. |
| 68 TEST(TestClientTest, TestTcpIPv4) { | 73 TEST(TestClientTest, TestTcpIPv4) { |
| 69 TestTcpInternal(SocketAddress("127.0.0.1", 0)); | 74 TestTcpInternal(SocketAddress("127.0.0.1", 0)); |
| 70 } | 75 } |
| 71 | 76 |
| 72 TEST(TestClientTest, TestTcpIPv6) { | 77 #if defined(WEBRTC_LINUX) |
| 78 #define MAYBE_TestTcpIPv6 DISABLED_TestTcpIPv6 |
| 79 #else |
| 80 #define MAYBE_TestTcpIPv6 TestTcpIPv6 |
| 81 #endif |
| 82 TEST(TestClientTest, MAYBE_TestTcpIPv6) { |
| 73 if (HasIPv6Enabled()) { | 83 if (HasIPv6Enabled()) { |
| 74 TestTcpInternal(SocketAddress("::1", 0)); | 84 TestTcpInternal(SocketAddress("::1", 0)); |
| 75 } else { | 85 } else { |
| 76 LOG(LS_INFO) << "Skipping IPv6 test."; | 86 LOG(LS_INFO) << "Skipping IPv6 test."; |
| 77 } | 87 } |
| 78 } | 88 } |
| OLD | NEW |