aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY2025-10-01 14:56:17 +0200
committerJ08nY2025-10-01 14:56:17 +0200
commit3b0cebdb11974f83675dab52d3c0bcd0b2554526 (patch)
tree5e3c3aa8ca7bce15a5d206e7e5400329dd37b136
parentf92fef4992a32bbc22f5a2ec35328f106878cbd0 (diff)
downloadpyecsca-3b0cebdb11974f83675dab52d3c0bcd0b2554526.tar.gz
pyecsca-3b0cebdb11974f83675dab52d3c0bcd0b2554526.tar.zst
pyecsca-3b0cebdb11974f83675dab52d3c0bcd0b2554526.zip
-rw-r--r--test/ec/test_scalar.py7
1 files changed, 7 insertions, 0 deletions
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():