summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_retain_ptr_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_retain_ptr_unittest.cpp')
-rw-r--r--core/fxcrt/cfx_retain_ptr_unittest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_retain_ptr_unittest.cpp b/core/fxcrt/cfx_retain_ptr_unittest.cpp
index f9a4ecb74f..3168b5a4c7 100644
--- a/core/fxcrt/cfx_retain_ptr_unittest.cpp
+++ b/core/fxcrt/cfx_retain_ptr_unittest.cpp
@@ -225,6 +225,14 @@ TEST(fxcrt, RetainPtrNotEquals) {
EXPECT_TRUE(obj1_ptr1 != obj2_ptr1);
}
+TEST(fxcrt, RetainPtrLessThan) {
+ PseudoRetainable objs[2];
+ CFX_RetainPtr<PseudoRetainable> obj1_ptr(&objs[0]);
+ CFX_RetainPtr<PseudoRetainable> obj2_ptr(&objs[1]);
+ EXPECT_TRUE(obj1_ptr < obj2_ptr);
+ EXPECT_FALSE(obj2_ptr < obj1_ptr);
+}
+
TEST(fxcrt, RetainPtrBool) {
PseudoRetainable obj1;
CFX_RetainPtr<PseudoRetainable> null_ptr;