SF: Add operator<< to RefreshRate
Add operator<< to RefreshRate. This way test failures will show
actionable information instead of the binary form of the object.
Test: presubmit
Change-Id: If221bedffc6c4bee48a829bbe9fe1f35e591e698
diff --git a/services/surfaceflinger/Scheduler/RefreshRateConfigs.h b/services/surfaceflinger/Scheduler/RefreshRateConfigs.h
index ef193ca..29402f5 100644
--- a/services/surfaceflinger/Scheduler/RefreshRateConfigs.h
+++ b/services/surfaceflinger/Scheduler/RefreshRateConfigs.h
@@ -91,6 +91,9 @@
bool operator==(const RefreshRate& other) const { return !(*this != other); }
std::string toString() const;
+ friend std::ostream& operator<<(std::ostream& os, const RefreshRate& refreshRate) {
+ return os << refreshRate.toString();
+ }
private:
friend RefreshRateConfigs;