Moved webrtc/test/channel_transport/ into webrtc/voice_engine/test/

Only used in VoE tests so I'm moving it in under voice_engine/ until we've removed its usage and can deprecate.

Note: submitting this with PRESUBMIT=false because the files do not adhere to style guide conventions and I'd rather change that in a separate CL.

BUG=
NOPRESUBMIT=true

Review-Url: https://codereview.webrtc.org/2319583005
Cr-Commit-Position: refs/heads/master@{#14191}
This commit is contained in:
solenberg 2016-09-13 01:10:46 -07:00 committed by Commit bot
parent 88ac853e14
commit ade2a038a9
33 changed files with 200 additions and 204 deletions

View File

@ -771,7 +771,6 @@ if (rtc_include_tests) {
"modules/audio_processing:audioproc_test_utils",
"modules/remote_bitrate_estimator:bwe_simulator",
"modules/rtp_rtcp",
"test:channel_transport",
"test:test_common",
"test:test_main",
"test:test_renderer",

View File

@ -16,7 +16,6 @@ rtc_source_set("test") {
testonly = true
deps = [
":channel_transport",
":field_trial",
":rtp_test_utils",
":test_common",
@ -28,67 +27,6 @@ rtc_source_set("test") {
]
}
config("channel_transport_warnings_config") {
if (is_win) {
cflags = [ "/wd4302" ] # cast truncation
if (is_clang) {
# GN orders flags on a target before flags from configs. The default
# config adds -Wall, and this flag have to be after -Wall -- so they need
# to come from a config and cannot be on the target directly.
cflags += [
"-Wno-parentheses-equality",
"-Wno-reorder",
"-Wno-tautological-constant-out-of-range-compare",
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6268
# for -Wno-thread-safety-analysis
"-Wno-thread-safety-analysis",
"-Wno-unused-private-field",
]
}
}
}
rtc_source_set("channel_transport") {
testonly = true
sources = [
"channel_transport/channel_transport.cc",
"channel_transport/channel_transport.h",
"channel_transport/traffic_control_win.cc",
"channel_transport/traffic_control_win.h",
"channel_transport/udp_socket2_manager_win.cc",
"channel_transport/udp_socket2_manager_win.h",
"channel_transport/udp_socket2_win.cc",
"channel_transport/udp_socket2_win.h",
"channel_transport/udp_socket_manager_posix.cc",
"channel_transport/udp_socket_manager_posix.h",
"channel_transport/udp_socket_manager_wrapper.cc",
"channel_transport/udp_socket_manager_wrapper.h",
"channel_transport/udp_socket_posix.cc",
"channel_transport/udp_socket_posix.h",
"channel_transport/udp_socket_wrapper.cc",
"channel_transport/udp_socket_wrapper.h",
"channel_transport/udp_transport.h",
"channel_transport/udp_transport_impl.cc",
"channel_transport/udp_transport_impl.h",
]
configs += [ ":channel_transport_warnings_config" ]
if (is_clang && !is_nacl) {
# Suppress warnings from the Chromium Clang plugin.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
deps = [
"..:webrtc_common",
"../system_wrappers",
"//testing/gtest",
]
}
rtc_source_set("video_test_common") {
testonly = true
sources = [
@ -279,9 +217,6 @@ if (is_ios) {
rtc_test("test_support_unittests") {
deps = []
sources = [
"channel_transport/udp_socket_manager_unittest.cc",
"channel_transport/udp_socket_wrapper_unittest.cc",
"channel_transport/udp_transport_unittest.cc",
"fake_network_pipe_unittest.cc",
"frame_generator_unittest.cc",
"rtp_file_reader_unittest.cc",
@ -320,7 +255,6 @@ rtc_test("test_support_unittests") {
}
deps += [
":channel_transport",
":test_common",
":test_support_main",
"../modules/video_capture",

View File

@ -1 +0,0 @@
solenberg@webrtc.org

View File

@ -12,55 +12,6 @@
'../build/common.gypi',
],
'targets': [
{
'target_name': 'channel_transport',
'type': 'static_library',
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(webrtc_root)/common.gyp:webrtc_common',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
],
'sources': [
'channel_transport/channel_transport.cc',
'channel_transport/channel_transport.h',
'channel_transport/traffic_control_win.cc',
'channel_transport/traffic_control_win.h',
'channel_transport/udp_socket_manager_posix.cc',
'channel_transport/udp_socket_manager_posix.h',
'channel_transport/udp_socket_manager_wrapper.cc',
'channel_transport/udp_socket_manager_wrapper.h',
'channel_transport/udp_socket_posix.cc',
'channel_transport/udp_socket_posix.h',
'channel_transport/udp_socket_wrapper.cc',
'channel_transport/udp_socket_wrapper.h',
'channel_transport/udp_socket2_manager_win.cc',
'channel_transport/udp_socket2_manager_win.h',
'channel_transport/udp_socket2_win.cc',
'channel_transport/udp_socket2_win.h',
'channel_transport/udp_transport.h',
'channel_transport/udp_transport_impl.cc',
'channel_transport/udp_transport_impl.h',
],
'msvs_disabled_warnings': [
4302, # cast truncation
],
'conditions': [
['OS=="win" and clang==1', {
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
# Disable warnings failing when compiling with Clang on Windows.
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
'-Wno-parentheses-equality',
'-Wno-reorder',
'-Wno-tautological-constant-out-of-range-compare',
'-Wno-unused-private-field',
],
},
},
}],
], # conditions.
},
{
'target_name': 'video_test_common',
'type': 'static_library',
@ -202,7 +153,6 @@
'target_name': 'test_support_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
'channel_transport',
'test_common',
'test_support_main',
'<(webrtc_root)/modules/modules.gyp:video_capture',
@ -214,9 +164,6 @@
'frame_generator_unittest.cc',
'rtp_file_reader_unittest.cc',
'rtp_file_writer_unittest.cc',
'channel_transport/udp_transport_unittest.cc',
'channel_transport/udp_socket_manager_unittest.cc',
'channel_transport/udp_socket_wrapper_unittest.cc',
'testsupport/always_passing_unittest.cc',
'testsupport/unittest_utils.h',
'testsupport/fileutils_unittest.cc',

View File

@ -120,8 +120,70 @@ rtc_source_set("level_indicator") {
}
if (rtc_include_tests) {
config("channel_transport_warnings_config") {
if (is_win) {
cflags = [ "/wd4302" ] # cast truncation
if (is_clang) {
# GN orders flags on a target before flags from configs. The default
# config adds -Wall, and this flag have to be after -Wall -- so they need
# to come from a config and cannot be on the target directly.
cflags += [
"-Wno-parentheses-equality",
"-Wno-reorder",
"-Wno-tautological-constant-out-of-range-compare",
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6268
# for -Wno-thread-safety-analysis
"-Wno-thread-safety-analysis",
"-Wno-unused-private-field",
]
}
}
}
rtc_source_set("channel_transport") {
testonly = true
sources = [
"test/channel_transport/channel_transport.cc",
"test/channel_transport/channel_transport.h",
"test/channel_transport/traffic_control_win.cc",
"test/channel_transport/traffic_control_win.h",
"test/channel_transport/udp_socket2_manager_win.cc",
"test/channel_transport/udp_socket2_manager_win.h",
"test/channel_transport/udp_socket2_win.cc",
"test/channel_transport/udp_socket2_win.h",
"test/channel_transport/udp_socket_manager_posix.cc",
"test/channel_transport/udp_socket_manager_posix.h",
"test/channel_transport/udp_socket_manager_wrapper.cc",
"test/channel_transport/udp_socket_manager_wrapper.h",
"test/channel_transport/udp_socket_posix.cc",
"test/channel_transport/udp_socket_posix.h",
"test/channel_transport/udp_socket_wrapper.cc",
"test/channel_transport/udp_socket_wrapper.h",
"test/channel_transport/udp_transport.h",
"test/channel_transport/udp_transport_impl.cc",
"test/channel_transport/udp_transport_impl.h",
]
configs += [ ":channel_transport_warnings_config" ]
if (is_clang && !is_nacl) {
# Suppress warnings from the Chromium Clang plugin.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
deps = [
"..:webrtc_common",
"../system_wrappers",
"//testing/gtest",
]
}
rtc_test("voice_engine_unittests") {
deps = [
":channel_transport",
":voice_engine",
"//testing/gmock",
"//testing/gtest",
@ -145,6 +207,9 @@ if (rtc_include_tests) {
sources = [
"channel_unittest.cc",
"network_predictor_unittest.cc",
"test/channel_transport/udp_socket_manager_unittest.cc",
"test/channel_transport/udp_socket_wrapper_unittest.cc",
"test/channel_transport/udp_transport_unittest.cc",
"transmit_mixer_unittest.cc",
"utility_unittest.cc",
"voe_audio_processing_unittest.cc",
@ -176,6 +241,7 @@ if (rtc_include_tests) {
testonly = true
deps = [
":channel_transport",
":voice_engine",
"//testing/gmock",
"//testing/gtest",
@ -184,7 +250,6 @@ if (rtc_include_tests) {
"//webrtc/modules/video_capture",
"//webrtc/system_wrappers",
"//webrtc/system_wrappers/:system_wrappers_default",
"//webrtc/test/:channel_transport",
"//webrtc/test/:test_common",
"//webrtc/test/:test_support",
]

View File

@ -19,7 +19,7 @@
#include <memory>
#include "webrtc/test/channel_transport/channel_transport.h"
#include "webrtc/voice_engine/test/channel_transport/channel_transport.h"
#include "webrtc/voice_engine/test/auto_test/voe_test_defines.h"
using namespace webrtc;

View File

@ -12,7 +12,7 @@
#include "webrtc/base/random.h"
#include "webrtc/base/timeutils.h"
#include "webrtc/system_wrappers/include/sleep.h"
#include "webrtc/test/channel_transport/channel_transport.h"
#include "webrtc/voice_engine/test/channel_transport/channel_transport.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/voice_engine/test/auto_test/voe_standard_test.h"

View File

@ -25,7 +25,7 @@
#include "webrtc/voice_engine/test/auto_test/voe_stress_test.h"
#include "webrtc/system_wrappers/include/sleep.h"
#include "webrtc/test/channel_transport/channel_transport.h"
#include "webrtc/voice_engine/test/channel_transport/channel_transport.h"
#include "webrtc/voice_engine/test/auto_test/voe_standard_test.h"
#include "webrtc/voice_engine/test/auto_test/voe_test_defines.h"
#include "webrtc/voice_engine/voice_engine_defines.h" // defines build macros

View File

@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/test/channel_transport/channel_transport.h"
#include "webrtc/voice_engine/test/channel_transport/channel_transport.h"
#include <stdio.h>
#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
#include "testing/gtest/include/gtest/gtest.h"
#endif
#include "webrtc/test/channel_transport/udp_transport.h"
#include "webrtc/voice_engine/test/channel_transport/udp_transport.h"
#include "webrtc/voice_engine/include/voe_network.h"
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)

View File

@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_CHANNEL_TRANSPORT_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_CHANNEL_TRANSPORT_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_CHANNEL_TRANSPORT_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_CHANNEL_TRANSPORT_H_
#include "webrtc/test/channel_transport/udp_transport.h"
#include "webrtc/voice_engine/test/channel_transport/udp_transport.h"
namespace webrtc {
@ -53,4 +53,4 @@ class VoiceChannelTransport : public UdpTransportData {
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_CHANNEL_TRANSPORT_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_CHANNEL_TRANSPORT_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/test/channel_transport/traffic_control_win.h"
#include "webrtc/voice_engine/test/channel_transport/traffic_control_win.h"
#include <assert.h>

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_TRAFFIC_CONTROL_WINDOWS_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_TRAFFIC_CONTROL_WINDOWS_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_TRAFFIC_CONTROL_WINDOWS_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_TRAFFIC_CONTROL_WINDOWS_H_
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
@ -96,4 +96,4 @@ private:
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_TRAFFIC_CONTROL_WINDOWS_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_TRAFFIC_CONTROL_WINDOWS_H_

View File

@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/test/channel_transport/udp_socket2_manager_win.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket2_manager_win.h"
#include <assert.h>
#include <stdio.h>
#include "webrtc/system_wrappers/include/aligned_malloc.h"
#include "webrtc/test/channel_transport/udp_socket2_win.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket2_win.h"
namespace webrtc {
namespace test {

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_MANAGER_WINDOWS_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_MANAGER_WINDOWS_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_MANAGER_WINDOWS_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_MANAGER_WINDOWS_H_
#include <winsock2.h>
#include <list>
@ -18,9 +18,9 @@
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/event_wrapper.h"
#include "webrtc/base/platform_thread.h"
#include "webrtc/test/channel_transport/udp_socket2_win.h"
#include "webrtc/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/test/channel_transport/udp_transport.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket2_win.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_transport.h"
#define MAX_IO_BUFF_SIZE 1600
@ -159,4 +159,4 @@ private:
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_MANAGER_WINDOWS_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_MANAGER_WINDOWS_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/test/channel_transport/udp_socket2_win.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket2_win.h"
#include <assert.h>
#include <stdlib.h>
@ -16,8 +16,8 @@
#include "webrtc/base/format_macros.h"
#include "webrtc/system_wrappers/include/sleep.h"
#include "webrtc/test/channel_transport/traffic_control_win.h"
#include "webrtc/test/channel_transport/udp_socket2_manager_win.h"
#include "webrtc/voice_engine/test/channel_transport/traffic_control_win.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket2_manager_win.h"
#pragma warning(disable : 4311)

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_WINDOWS_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_WINDOWS_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_WINDOWS_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_WINDOWS_H_
// Disable deprication warning from traffic.h
#pragma warning(disable : 4995)
@ -24,8 +24,8 @@
#include "webrtc/system_wrappers/include/event_wrapper.h"
#include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/test/channel_transport/udp_socket2_manager_win.h"
#include "webrtc/test/channel_transport/udp_socket_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket2_manager_win.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h"
namespace webrtc {
namespace test {
@ -171,4 +171,4 @@ private:
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_WINDOWS_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET2_WINDOWS_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/test/channel_transport/udp_socket_manager_posix.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_posix.h"
#include <stdio.h>
#include <strings.h>
@ -19,7 +19,7 @@
#include "webrtc/system_wrappers/include/sleep.h"
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/test/channel_transport/udp_socket_posix.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_posix.h"
namespace webrtc {
namespace test {

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_POSIX_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_POSIX_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_POSIX_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_POSIX_H_
#include <sys/types.h>
#include <unistd.h>
@ -19,8 +19,8 @@
#include "webrtc/base/platform_thread.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/test/channel_transport/udp_socket_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h"
namespace webrtc {
namespace test {
@ -85,4 +85,4 @@ private:
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_POSIX_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_POSIX_H_

View File

@ -17,8 +17,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/test/channel_transport/udp_socket_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h"
namespace webrtc {
namespace test {

View File

@ -8,15 +8,15 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h"
#include <assert.h>
#ifdef _WIN32
#include "webrtc/system_wrappers/include/fix_interlocked_exchange_pointer_win.h"
#include "webrtc/test/channel_transport/udp_socket2_manager_win.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket2_manager_win.h"
#else
#include "webrtc/test/channel_transport/udp_socket_manager_posix.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_posix.h"
#endif
namespace webrtc {

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_WRAPPER_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_WRAPPER_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_WRAPPER_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_WRAPPER_H_
#include "webrtc/system_wrappers/include/static_instance.h"
#include "webrtc/typedefs.h"
@ -67,4 +67,4 @@ private:
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_WRAPPER_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_MANAGER_WRAPPER_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/test/channel_transport/udp_socket_posix.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_posix.h"
#include <errno.h>
#include <fcntl.h>
@ -21,8 +21,8 @@
#include <unistd.h>
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/test/channel_transport/udp_socket_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h"
namespace webrtc {
namespace test {

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_POSIX_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_POSIX_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_POSIX_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_POSIX_H_
#include <arpa/inet.h>
#include <netinet/in.h>
@ -18,7 +18,7 @@
#include "webrtc/base/event.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/test/channel_transport/udp_socket_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h"
namespace webrtc {
namespace test {
@ -91,4 +91,4 @@ private:
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_POSIX_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_POSIX_H_

View File

@ -8,19 +8,19 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/test/channel_transport/udp_socket_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h"
#include <stdlib.h>
#include <string.h>
#include "webrtc/system_wrappers/include/event_wrapper.h"
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h"
#if defined(_WIN32)
#include "webrtc/test/channel_transport/udp_socket2_win.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket2_win.h"
#else
#include "webrtc/test/channel_transport/udp_socket_posix.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_posix.h"
#endif

View File

@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_WRAPPER_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_WRAPPER_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_WRAPPER_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_WRAPPER_H_
#include "webrtc/test/channel_transport/udp_transport.h"
#include "webrtc/voice_engine/test/channel_transport/udp_transport.h"
namespace webrtc {
@ -109,4 +109,4 @@ private:
} // namespac test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_WRAPPER_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_SOCKET_WRAPPER_H_

View File

@ -22,8 +22,8 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/test/channel_transport/udp_socket_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h"
using ::testing::_;
using ::testing::Return;

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_
#include "webrtc/common_types.h"
#include "webrtc/transport.h"
@ -378,4 +378,4 @@ class UdpTransport : public Transport {
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/test/channel_transport/udp_transport_impl.h"
#include "webrtc/voice_engine/test/channel_transport/udp_transport_impl.h"
#include <stdio.h>
#include <stdlib.h>
@ -48,7 +48,7 @@
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/typedefs.h"
#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)

View File

@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_IMPL_H_
#define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_IMPL_H_
#ifndef WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_IMPL_H_
#define WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_IMPL_H_
#include "webrtc/test/channel_transport/udp_socket_wrapper.h"
#include "webrtc/test/channel_transport/udp_transport.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_transport.h"
namespace webrtc {
@ -256,4 +256,4 @@ private:
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_IMPL_H_
#endif // WEBRTC_VOICE_ENGINE_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_IMPL_H_

View File

@ -12,12 +12,12 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/test/channel_transport/udp_transport.h"
#include "webrtc/voice_engine/test/channel_transport/udp_transport.h"
// We include the implementation header file to get at the dependency-injecting
// constructor.
#include "webrtc/test/channel_transport/udp_transport_impl.h"
#include "webrtc/voice_engine/test/channel_transport/udp_transport_impl.h"
// We must mock the socket manager, for which we need its definition.
#include "webrtc/test/channel_transport/udp_socket_manager_wrapper.h"
#include "webrtc/voice_engine/test/channel_transport/udp_socket_manager_wrapper.h"
using ::testing::_;
using ::testing::Return;
@ -95,7 +95,7 @@ class UDPTransportTest : public ::testing::Test {
}
}
int NumSocketsCreated() {
size_t NumSocketsCreated() {
return sockets_created_.size();
}
@ -133,7 +133,7 @@ TEST_F(UDPTransportTest, InitializeSourcePorts) {
mock_maker,
mock_manager);
EXPECT_EQ(0, transport->InitializeSourcePorts(4711, 4712));
EXPECT_EQ(2, NumSocketsCreated());
EXPECT_EQ(2u, NumSocketsCreated());
delete transport;
mock_manager->Destroy();

View File

@ -23,7 +23,7 @@
#include "webrtc/base/format_macros.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/test/channel_transport/channel_transport.h"
#include "webrtc/voice_engine/test/channel_transport/channel_transport.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/test/testsupport/trace_to_stderr.h"
#include "webrtc/voice_engine/include/voe_audio_processing.h"

View File

@ -107,7 +107,57 @@
'level_indicator.cc',
'level_indicator.h',
]
}
},
{
'target_name': 'channel_transport',
'type': 'static_library',
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(webrtc_root)/common.gyp:webrtc_common',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
],
'sources': [
'test/channel_transport/channel_transport.cc',
'test/channel_transport/channel_transport.h',
'test/channel_transport/traffic_control_win.cc',
'test/channel_transport/traffic_control_win.h',
'test/channel_transport/udp_socket_manager_posix.cc',
'test/channel_transport/udp_socket_manager_posix.h',
'test/channel_transport/udp_socket_manager_wrapper.cc',
'test/channel_transport/udp_socket_manager_wrapper.h',
'test/channel_transport/udp_socket_posix.cc',
'test/channel_transport/udp_socket_posix.h',
'test/channel_transport/udp_socket_wrapper.cc',
'test/channel_transport/udp_socket_wrapper.h',
'test/channel_transport/udp_socket2_manager_win.cc',
'test/channel_transport/udp_socket2_manager_win.h',
'test/channel_transport/udp_socket2_win.cc',
'test/channel_transport/udp_socket2_win.h',
'test/channel_transport/udp_transport.h',
'test/channel_transport/udp_transport_impl.cc',
'test/channel_transport/udp_transport_impl.h',
],
'msvs_disabled_warnings': [
4302, # cast truncation
],
'conditions': [
['OS=="win" and clang==1', {
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
# Disable warnings failing when compiling with Clang on Windows.
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
'-Wno-parentheses-equality',
'-Wno-reorder',
'-Wno-tautological-constant-out-of-range-compare',
'-Wno-unused-private-field',
],
},
},
}],
], # conditions.
},
],
'conditions': [
['OS=="win"', {
@ -119,6 +169,7 @@
'target_name': 'voice_engine_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
'channel_transport',
'voice_engine',
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
@ -138,6 +189,9 @@
'sources': [
'channel_unittest.cc',
'network_predictor_unittest.cc',
'test/channel_transport/udp_transport_unittest.cc',
'test/channel_transport/udp_socket_manager_unittest.cc',
'test/channel_transport/udp_socket_wrapper_unittest.cc',
'transmit_mixer_unittest.cc',
'utility_unittest.cc',
'voe_audio_processing_unittest.cc',
@ -160,12 +214,12 @@
'target_name': 'voe_cmd_test',
'type': 'executable',
'dependencies': [
'channel_transport',
'voice_engine',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
'<(webrtc_root)/test/test.gyp:channel_transport',
'<(webrtc_root)/test/test.gyp:test_support',
'<(webrtc_root)/webrtc.gyp:rtc_event_log',
],
@ -181,13 +235,13 @@
'target_name': 'voe_auto_test',
'type': 'executable',
'dependencies': [
'channel_transport',
'voice_engine',
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
'<(webrtc_root)/test/test.gyp:channel_transport',
'<(webrtc_root)/test/test.gyp:test_common',
'<(webrtc_root)/test/test.gyp:test_support',
'<(webrtc_root)/webrtc.gyp:rtc_event_log',

View File

@ -385,7 +385,6 @@
'<(webrtc_root)/common.gyp:webrtc_common',
'<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
'<(webrtc_root)/modules/modules.gyp:video_capture',
'<(webrtc_root)/test/test.gyp:channel_transport',
'<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
'test/test.gyp:test_common',
'test/test.gyp:test_main',
@ -444,7 +443,6 @@
'<(webrtc_root)/modules/modules.gyp:audio_processing',
'<(webrtc_root)/modules/modules.gyp:audioproc_test_utils',
'<(webrtc_root)/modules/modules.gyp:video_capture',
'<(webrtc_root)/test/test.gyp:channel_transport',
'<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
'video_quality_test',
'modules/modules.gyp:neteq_test_support',