Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1398)

Unified Diff: core/fxcrt/cfx_retain_ptr_unittest.cpp

Issue 2616683002: Add missing operator<() to CFX_RetainPtr (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcrt/cfx_retain_ptr.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/cfx_retain_ptr_unittest.cpp
diff --git a/core/fxcrt/cfx_retain_ptr_unittest.cpp b/core/fxcrt/cfx_retain_ptr_unittest.cpp
index f9a4ecb74ffb6446209ebfa8644f2b7459859618..3168b5a4c7bfeb28d55a185e36da69cfc3a3afcf 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;
« no previous file with comments | « core/fxcrt/cfx_retain_ptr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698