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

Unified Diff: tests/corelib/src/SplayTreeTest.dart

Issue 9455051: Add getMinimum, getMaximum, getPreceding and getSucceeding to SplayTree. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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
Index: tests/corelib/src/SplayTreeTest.dart
===================================================================
--- tests/corelib/src/SplayTreeTest.dart (revision 4598)
+++ tests/corelib/src/SplayTreeTest.dart (working copy)
@@ -24,6 +24,18 @@
Expect.equals(true, key <= 5);
Expect.equals(value, correctSolution[key - 1]);
});
+
+ Expect.equals(1, tree.firstKey());
+ Expect.equals(1, tree.firstKey());
+
+ Expect.equals(2, tree.keyBefore(3));
+ Expect.equals(4, tree.keyAfter(3));
+
+ Expect.equals(-10, tree.keyBefore(1, -10));
+ Expect.equals(2, tree.keyAfter(1, -10));
+
+ Expect.equals(4, tree.keyBefore(5, -10));
+ Expect.equals(-10, tree.keyAfter(5, -10));
}
}
« corelib/src/implementation/splay_tree.dart ('K') | « corelib/src/implementation/splay_tree.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698