From b95d90b78a3491ef8e8aa0640dd521515ec881ca Mon Sep 17 00:00:00 2001 From: Andrey Logvin Date: Wed, 9 Dec 2020 12:49:39 +0000 Subject: [PATCH] Rename UNIT_TEST to WEBRTC_UNIT_TEST Current name conflicts with upstream project code. Bug: webrtc:12247 Change-Id: Ibd78273a75262772fc18fca688c29b9ba9525ce5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196653 Reviewed-by: Harald Alvestrand Reviewed-by: Mirko Bonadei Commit-Queue: Andrey Logvin Cr-Commit-Position: refs/heads/master@{#32813} --- api/rtc_error.h | 8 ++++---- api/units/data_rate.h | 8 ++++---- api/units/data_size.h | 8 ++++---- api/units/frequency.h | 8 ++++---- api/units/time_delta.h | 8 ++++---- api/units/timestamp.h | 8 ++++---- pc/rtp_media_utils.h | 4 ++-- rtc_base/ip_address.h | 4 ++-- rtc_base/socket_address.h | 8 ++++---- test/BUILD.gn | 2 +- 10 files changed, 33 insertions(+), 33 deletions(-) diff --git a/api/rtc_error.h b/api/rtc_error.h index d24737c251..7cfd89ab75 100644 --- a/api/rtc_error.h +++ b/api/rtc_error.h @@ -11,9 +11,9 @@ #ifndef API_RTC_ERROR_H_ #define API_RTC_ERROR_H_ -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST #include -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST #include #include // For std::move. @@ -161,7 +161,7 @@ class RTC_EXPORT RTCError { RTC_EXPORT const char* ToString(RTCErrorType error); RTC_EXPORT const char* ToString(RTCErrorDetailType error); -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) std::ostream& stream, // no-presubmit-check TODO(webrtc:8982) RTCErrorType error) { @@ -173,7 +173,7 @@ inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) RTCErrorDetailType error) { return stream << ToString(error); } -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST // Helper macro that can be used by implementations to create an error with a // message and log it. |message| should be a string literal or movable diff --git a/api/units/data_rate.h b/api/units/data_rate.h index 5c8a61fd9c..98572123c5 100644 --- a/api/units/data_rate.h +++ b/api/units/data_rate.h @@ -11,9 +11,9 @@ #ifndef API_UNITS_DATA_RATE_H_ #define API_UNITS_DATA_RATE_H_ -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST #include // no-presubmit-check TODO(webrtc:8982) -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST #include #include @@ -142,13 +142,13 @@ inline std::string ToLogString(DataRate value) { return ToString(value); } -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) std::ostream& stream, // no-presubmit-check TODO(webrtc:8982) DataRate value) { return stream << ToString(value); } -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST } // namespace webrtc diff --git a/api/units/data_size.h b/api/units/data_size.h index 27a2a4e4dc..6817e24c26 100644 --- a/api/units/data_size.h +++ b/api/units/data_size.h @@ -11,9 +11,9 @@ #ifndef API_UNITS_DATA_SIZE_H_ #define API_UNITS_DATA_SIZE_H_ -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST #include // no-presubmit-check TODO(webrtc:8982) -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST #include #include @@ -53,13 +53,13 @@ inline std::string ToLogString(DataSize value) { return ToString(value); } -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) std::ostream& stream, // no-presubmit-check TODO(webrtc:8982) DataSize value) { return stream << ToString(value); } -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST } // namespace webrtc diff --git a/api/units/frequency.h b/api/units/frequency.h index 88912c64d5..8e9cc2b5f4 100644 --- a/api/units/frequency.h +++ b/api/units/frequency.h @@ -10,9 +10,9 @@ #ifndef API_UNITS_FREQUENCY_H_ #define API_UNITS_FREQUENCY_H_ -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST #include // no-presubmit-check TODO(webrtc:8982) -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST #include #include @@ -89,13 +89,13 @@ inline std::string ToLogString(Frequency value) { return ToString(value); } -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) std::ostream& stream, // no-presubmit-check TODO(webrtc:8982) Frequency value) { return stream << ToString(value); } -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST } // namespace webrtc #endif // API_UNITS_FREQUENCY_H_ diff --git a/api/units/time_delta.h b/api/units/time_delta.h index 173affcc56..6f1910379b 100644 --- a/api/units/time_delta.h +++ b/api/units/time_delta.h @@ -11,9 +11,9 @@ #ifndef API_UNITS_TIME_DELTA_H_ #define API_UNITS_TIME_DELTA_H_ -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST #include // no-presubmit-check TODO(webrtc:8982) -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST #include #include @@ -92,13 +92,13 @@ inline std::string ToLogString(TimeDelta value) { return ToString(value); } -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) std::ostream& stream, // no-presubmit-check TODO(webrtc:8982) TimeDelta value) { return stream << ToString(value); } -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST } // namespace webrtc diff --git a/api/units/timestamp.h b/api/units/timestamp.h index f83477e808..1e9f9d1dc5 100644 --- a/api/units/timestamp.h +++ b/api/units/timestamp.h @@ -11,9 +11,9 @@ #ifndef API_UNITS_TIMESTAMP_H_ #define API_UNITS_TIMESTAMP_H_ -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST #include // no-presubmit-check TODO(webrtc:8982) -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST #include #include @@ -125,13 +125,13 @@ inline std::string ToLogString(Timestamp value) { return ToString(value); } -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) std::ostream& stream, // no-presubmit-check TODO(webrtc:8982) Timestamp value) { return stream << ToString(value); } -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST } // namespace webrtc diff --git a/pc/rtp_media_utils.h b/pc/rtp_media_utils.h index f556fe3977..e90a76eecb 100644 --- a/pc/rtp_media_utils.h +++ b/pc/rtp_media_utils.h @@ -49,13 +49,13 @@ RtpTransceiverDirection RtpTransceiverDirectionIntersection( RtpTransceiverDirection lhs, RtpTransceiverDirection rhs); -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) std::ostream& os, // no-presubmit-check TODO(webrtc:8982) RtpTransceiverDirection direction) { return os << RtpTransceiverDirectionToString(direction); } -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST } // namespace webrtc diff --git a/rtc_base/ip_address.h b/rtc_base/ip_address.h index ae135a69dc..8725417393 100644 --- a/rtc_base/ip_address.h +++ b/rtc_base/ip_address.h @@ -80,12 +80,12 @@ class RTC_EXPORT IPAddress { bool operator<(const IPAddress& other) const; bool operator>(const IPAddress& other) const; -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) std::ostream& os) { // no-presubmit-check TODO(webrtc:8982) return os << ToString(); } -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST int family() const { return family_; } in_addr ipv4_address() const; diff --git a/rtc_base/socket_address.h b/rtc_base/socket_address.h index 6ee3d37bce..f459407f54 100644 --- a/rtc_base/socket_address.h +++ b/rtc_base/socket_address.h @@ -12,9 +12,9 @@ #define RTC_BASE_SOCKET_ADDRESS_H_ #include -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST #include // no-presubmit-check TODO(webrtc:8982) -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST #include "rtc_base/ip_address.h" #include "rtc_base/system/rtc_export.h" @@ -127,12 +127,12 @@ class RTC_EXPORT SocketAddress { // Parses hostname:port and [hostname]:port. bool FromString(const std::string& str); -#ifdef UNIT_TEST +#ifdef WEBRTC_UNIT_TEST inline std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) std::ostream& os) { // no-presubmit-check TODO(webrtc:8982) return os << HostAsURIString() << ":" << port(); } -#endif // UNIT_TEST +#endif // WEBRTC_UNIT_TEST // Determines whether this represents a missing / any IP address. // That is, 0.0.0.0 or ::. diff --git a/test/BUILD.gn b/test/BUILD.gn index 9fa0e006dc..0e1209fd20 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -303,7 +303,7 @@ config("suppress_warning_4373") { config("test_main_direct_config") { visibility = [ ":*" ] - defines = [ "UNIT_TEST" ] + defines = [ "WEBRTC_UNIT_TEST" ] } rtc_source_set("test_support") { visibility = [ "*" ]