Adds debug printing of units in unit tests.
Bug: webrtc:9656 Change-Id: I643b79bc214643f47b2b64967ce713665dbef5c9 Reviewed-on: https://webrtc-review.googlesource.com/95652 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24436}
This commit is contained in:
committed by
Commit Bot
parent
1946a3f0fe
commit
2afd281ec4
@ -22,7 +22,12 @@ std::string ToString(const TimeDelta& value) {
|
||||
} else if (value.IsMinusInfinity()) {
|
||||
sb << "-inf ms";
|
||||
} else {
|
||||
sb << value.ms() << " ms";
|
||||
if (value.us() == 0 || (value.us() % 1000) != 0)
|
||||
sb << value.us() << " us";
|
||||
else if (value.ms() % 1000 != 0)
|
||||
sb << value.ms() << " ms";
|
||||
else
|
||||
sb << value.seconds() << " s";
|
||||
}
|
||||
return sb.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user