ndk backend: comparison operators
These were clearly written in order to support C++ and NDK backend, but
not enabled, so enabling them there.
Bug: 175018841
Test: atest CtsNdkBinderTestCases
Change-Id: I2c0da9653f36f98c28c09715d680de85af0dc59a
Merged-In: I2c0da9653f36f98c28c09715d680de85af0dc59a
diff --git a/aidl_unittest.cpp b/aidl_unittest.cpp
index 0956fa6..c4651c8 100644
--- a/aidl_unittest.cpp
+++ b/aidl_unittest.cpp
@@ -3375,6 +3375,26 @@
binder_status_t readFromParcel(const AParcel* _parcel);
binder_status_t writeToParcel(AParcel* _parcel) const;
+
+ inline bool operator!=(const Foo& rhs) const {
+ return _value != rhs._value;
+ }
+ inline bool operator<(const Foo& rhs) const {
+ return _value < rhs._value;
+ }
+ inline bool operator<=(const Foo& rhs) const {
+ return _value <= rhs._value;
+ }
+ inline bool operator==(const Foo& rhs) const {
+ return _value == rhs._value;
+ }
+ inline bool operator>(const Foo& rhs) const {
+ return _value > rhs._value;
+ }
+ inline bool operator>=(const Foo& rhs) const {
+ return _value >= rhs._value;
+ }
+
static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_LOCAL;
template <typename _T> class _has_toString {
template <typename _U> static std::true_type __has_toString(decltype(&_U::toString));