Moved ostream operators for network units to test.

Added ToString functions in a separate header and move the ostream
operators to a test only header.

Bug: webrtc:8982
Change-Id: If547173aa39bbae2244531e2d3091886f14eae31
Reviewed-on: https://webrtc-review.googlesource.com/65280
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22674}
This commit is contained in:
Sebastian Jansson
2018-03-29 11:01:32 +02:00
committed by Commit Bot
parent 003211c5da
commit 01cb965d34
12 changed files with 133 additions and 49 deletions

View File

@ -9,6 +9,7 @@
*/
#include "modules/congestion_controller/network_control/test/network_control_tester.h"
#include "modules/congestion_controller/network_control/test/network_ostream_operators.h"
#include <algorithm>

View File

@ -9,8 +9,31 @@
*/
#include "modules/congestion_controller/network_control/test/network_ostream_operators.h"
#include "modules/congestion_controller/network_control/include/network_units_to_string.h"
namespace webrtc {
std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const DataRate& value) {
return os << ToString(value);
}
std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const DataSize& value) {
return os << ToString(value);
}
std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const Timestamp& value) {
return os << ToString(value);
}
std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const TimeDelta& value) {
return os << ToString(value);
}
::std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
::std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const CongestionWindow& window) {

View File

@ -15,6 +15,19 @@
#include "modules/congestion_controller/network_control/include/network_types.h"
namespace webrtc {
::std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
::std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const DataRate& datarate);
::std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
::std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const DataSize& datasize);
::std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
::std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const Timestamp& timestamp);
::std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
::std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const TimeDelta& delta);
::std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
::std::ostream& os, // no-presubmit-check TODO(webrtc:8982)
const CongestionWindow& window);