Skip to content

Commit 3d268b6

Browse files
committed
Fix slice unit test
This fixes the unit test so that it matches the result of `Enum.slice` on a regular list. ```elixir iex> Enum.slice([1, 2, 3, 4, 5], -6, 5) [1, 2, 3, 4, 5] ```
1 parent 7748e3d commit 3d268b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/circular_buffer_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ defmodule CircularBufferTest do
131131
assert Enum.slice(cb, 6, 5) == []
132132
assert Enum.slice(cb, 6, 0) == []
133133
assert Enum.slice(cb, -6, 0) == []
134-
assert Enum.slice(cb, -6, 5) == []
134+
assert Enum.slice(cb, -6, 5) == [1, 2, 3, 4, 5]
135135
assert Enum.slice(cb, -2, 5) == [4, 5]
136136
assert Enum.slice(cb, -3, 1) == [3]
137137

0 commit comments

Comments
 (0)