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

Unified Diff: chrome/common/string_ordinal_unittest.cc

Issue 8198003: Convert app_launch_index and page_index from int to StringOrdinal. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixing clang compile Created 9 years 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 | « chrome/common/string_ordinal.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/string_ordinal_unittest.cc
diff --git a/chrome/common/string_ordinal_unittest.cc b/chrome/common/string_ordinal_unittest.cc
index 8b95eab5b4b16db6846ac9ea7d881ff915cacba9..d3f866c8b5604f29998a85e79831a5ab0e510c15 100644
--- a/chrome/common/string_ordinal_unittest.cc
+++ b/chrome/common/string_ordinal_unittest.cc
@@ -29,6 +29,22 @@ TEST(StringOrdinalTest, LessThan) {
EXPECT_FALSE(middle_value.LessThan(small_value));
}
+TEST(StringOrdinalTest, GreaterThan) {
+ StringOrdinal small_value("b");
+ StringOrdinal middle_value("n");
+ StringOrdinal big_value("z");
+
+ EXPECT_TRUE(big_value.GreaterThan(small_value));
+ EXPECT_TRUE(big_value.GreaterThan(middle_value));
+ EXPECT_TRUE(middle_value.GreaterThan(small_value));
+
+
+ EXPECT_FALSE(small_value.GreaterThan(middle_value));
+ EXPECT_FALSE(small_value.GreaterThan(big_value));
+ EXPECT_FALSE(middle_value.GreaterThan(big_value));
+}
+
+
// Tests the CreateBetween StringOrdinal function by calling
// on the small_value with the large_value as the parameter and
// vice-versa.
« no previous file with comments | « chrome/common/string_ordinal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698