From 3b0cebdb11974f83675dab52d3c0bcd0b2554526 Mon Sep 17 00:00:00 2001 From: J08nY Date: Wed, 1 Oct 2025 14:56:17 +0200 Subject: More tests for sliding windows. --- test/ec/test_scalar.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/ec/test_scalar.py b/test/ec/test_scalar.py index 9c6cb60..6e40d1c 100644 --- a/test/ec/test_scalar.py +++ b/test/ec/test_scalar.py @@ -17,7 +17,14 @@ def test_convert(): def test_sliding_window(): assert sliding_window_ltr(181, 3) == [5, 0, 0, 5, 0, 1] + assert sliding_window_ltr(0, 3) == [] + assert sliding_window_ltr(1234, 2) == [1, 0, 0, 0, 3, 0, 1, 0, 0, 1, 0] + assert sliding_window_ltr(0b10101010, 4) == [5, 0, 0, 0, 5, 0] + assert sliding_window_rtl(181, 3) == [1, 0, 0, 3, 0, 0, 0, 5] + assert sliding_window_rtl(0, 3) == [] + assert sliding_window_rtl(1234, 2) == [1, 0, 0, 0, 3, 0, 1, 0, 0, 1, 0] + assert sliding_window_rtl(0b10101010, 4) == [5, 0, 0, 0, 5, 0] def test_nafs(): -- cgit v1.2.3-70-g09d2