aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit_tests/completion_test.coffee
diff options
context:
space:
mode:
authorStephen Blott2012-11-11 15:59:27 +0000
committerStephen Blott2012-11-11 15:59:27 +0000
commit2071873f5c9f496e4fde94d44cbf8b0e50bf4c21 (patch)
treea3e37e4adc1f41a02ce27ca5c791a3d98c54829b /tests/unit_tests/completion_test.coffee
parent03823f97a526ed5e5104b724d4f2a0b582505a6c (diff)
downloadvimium-2071873f5c9f496e4fde94d44cbf8b0e50bf4c21.tar.bz2
Remove comments regarding non-existent bug.
Diffstat (limited to 'tests/unit_tests/completion_test.coffee')
-rw-r--r--tests/unit_tests/completion_test.coffee9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/unit_tests/completion_test.coffee b/tests/unit_tests/completion_test.coffee
index 5d7be78b..f0fc9ded 100644
--- a/tests/unit_tests/completion_test.coffee
+++ b/tests/unit_tests/completion_test.coffee
@@ -41,13 +41,8 @@ context "HistoryCache",
should "return length - 1 if it should be at the end of the list", ->
assert.equal 0, HistoryCache.binarySearch(3, [3, 5, 8], @compare)
- # FIXME (smblott)
- # The following should pass, but fails.
- # I think it's what the test above intends (but misses because of a typo).
- # Bottom line: binarySearch can currently return an index beyond the end of the array.
- #
- # should "return end of list if greater than last element in list", ->
- # assert.equal 2, HistoryCache.binarySearch(10, [3, 5, 8], @compare)
+ should "return one passed end of list (so: list.length) if greater than last element in list", ->
+ assert.equal 3, HistoryCache.binarySearch(10, [3, 5, 8], @compare)
should "found return the position if it's between two elements", ->
assert.equal 1, HistoryCache.binarySearch(4, [3, 5, 8], @compare)