aboutsummaryrefslogtreecommitdiff
path: root/tests/framework/instruments/Measurement.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/framework/instruments/Measurement.h')
-rw-r--r--tests/framework/instruments/Measurement.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/framework/instruments/Measurement.h b/tests/framework/instruments/Measurement.h
index 9fb75d7b99..1beacf6cc5 100644
--- a/tests/framework/instruments/Measurement.h
+++ b/tests/framework/instruments/Measurement.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -208,6 +208,17 @@ struct Measurement
bool is_floating_point; /**< Is the stored value floating point or integer ? */
};
+ /** Compare the stored value with another value
+ *
+ * @param[in] b Value to compare against
+ *
+ * @return The result of stored value < b
+ */
+ bool operator<(const Measurement &b) const
+ {
+ return _value < b.value();
+ }
+
/** Stream output operator to print the measurement.
*
* Prints value and unit.