Skip to content

Commit

Permalink
Fix slice unit test
Browse files Browse the repository at this point in the history
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]
```
  • Loading branch information
fhunleth committed Sep 26, 2024
1 parent 7748e3d commit 295d5a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/circular_buffer_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ defmodule CircularBufferTest do
assert Enum.slice(cb, 6, 5) == []
assert Enum.slice(cb, 6, 0) == []
assert Enum.slice(cb, -6, 0) == []
assert Enum.slice(cb, -6, 5) == []
assert Enum.slice(cb, -6, 5) == [1, 2, 3, 4, 5]
assert Enum.slice(cb, -2, 5) == [4, 5]
assert Enum.slice(cb, -3, 1) == [3]

Expand Down

0 comments on commit 295d5a8

Please sign in to comment.