Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated to include a 0 in the list, so false values can be tested.

  • Loading branch information...
commit b02035c7cb366f301500b04d84534a433f9725ff 1 parent 4255853
@prakashk prakashk authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 t/01-sliding-window.t
View
6 t/01-sliding-window.t
@@ -15,9 +15,9 @@ is ~sliding-window((1, 2, 3, 4, 5), 3), ~(1, 2, 3, 2, 3, 4, 3, 4, 5), "three at
is ~sliding-window(1..5, 3), ~(1, 2, 3, 2, 3, 4, 3, 4, 5), "three at a time works (range)";
{
- my @a = 1..5;
- is ~sliding-window(@a, 2), ~(1, 2, 2, 3, 3, 4, 4, 5), "two at a time works on Array";
- is ~@a, (1, 2, 3, 4, 5), "Original array still okay";
+ my @a = 0..5;
+ is ~sliding-window(@a, 2), ~(0, 1, 1, 2, 2, 3, 3, 4, 4, 5), "two at a time works on Array";
+ is ~@a, (0, 1, 2, 3, 4, 5), "Original array still okay";
}
is ~sliding-window(([1, 'a'], [2, 'b'], [3, 'c']), 2), ~(([1, 'a'], [2, 'b']), ([2, 'b'], [3, 'c'])),
Please sign in to comment.
Something went wrong with that request. Please try again.