diff --git a/BUILD.gn b/BUILD.gn index ae2f7166fa..861644d1ca 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -474,6 +474,7 @@ if (rtc_include_tests) { deps = [ ":webrtc_common", + "api:compile_all_headers", "api:rtc_api_unittests", "api/audio/test:audio_api_unittests", "api/audio_codecs/test:audio_codecs_api_unittests", diff --git a/api/BUILD.gn b/api/BUILD.gn index 2a86b0a93c..d8681b154c 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -662,4 +662,31 @@ if (rtc_include_tests) { "units:units_unittests", ] } + + rtc_source_set("compile_all_headers") { + testonly = true + + sources = [ + "test/compile_all_headers.cc", + ] + + deps = [ + ":fake_frame_decryptor", + ":fake_frame_encryptor", + ":fake_media_transport", + ":loopback_media_transport", + ":mock_audio_mixer", + ":mock_frame_decryptor", + ":mock_frame_encryptor", + ":mock_peerconnectioninterface", + ":mock_rtp", + ":mock_video_bitrate_allocator", + ":mock_video_bitrate_allocator_factory", + ":mock_video_codec_factory", + ":mock_video_decoder", + ":mock_video_encoder", + ":rtc_api_unittests", + "units:units_unittests", + ] + } } diff --git a/api/test/compile_all_headers.cc b/api/test/compile_all_headers.cc new file mode 100644 index 0000000000..47c5c6ec84 --- /dev/null +++ b/api/test/compile_all_headers.cc @@ -0,0 +1,45 @@ +/* + * Copyright 2019 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file verifies that all include files in this directory can be +// compiled without errors or other required includes. + +// Note: The following header files are not not tested here, as their +// associated targets are not included in all configurations. +// "api/test/audioproc_float.h" +// "api/test/create_video_quality_test_fixture.h" +// "api/test/neteq_simulator_factory.h" +// "api/test/video_quality_test_fixture.h" +// The following header files are also not tested: +// "api/test/create_simulcast_test_fixture.h" +// "api/test/create_videocodec_test_fixture.h" +// "api/test/neteq_simulator.h" +// "api/test/simulated_network.h" +// "api/test/simulcast_test_fixture.h" +// "api/test/test_dependency_factory.h" +// "api/test/videocodec_test_fixture.h" +// "api/test/videocodec_test_stats.h" + +#include "api/test/fake_frame_decryptor.h" +#include "api/test/fake_frame_encryptor.h" +#include "api/test/fake_media_transport.h" +#include "api/test/loopback_media_transport.h" +#include "api/test/mock_audio_mixer.h" +#include "api/test/mock_frame_decryptor.h" +#include "api/test/mock_frame_encryptor.h" +#include "api/test/mock_peerconnectioninterface.h" +#include "api/test/mock_rtpreceiver.h" +#include "api/test/mock_rtpsender.h" +#include "api/test/mock_video_bitrate_allocator.h" +#include "api/test/mock_video_bitrate_allocator_factory.h" +#include "api/test/mock_video_decoder.h" +#include "api/test/mock_video_decoder_factory.h" +#include "api/test/mock_video_encoder.h" +#include "api/test/mock_video_encoder_factory.h"