From 5afbe98d53fa44b65846f30daf93a8d77e580c76 Mon Sep 17 00:00:00 2001
From: Oscar Gustafsson <oscar.gustafsson@gmail.com>
Date: Wed, 15 Feb 2023 07:44:39 +0100
Subject: [PATCH] Add test for FIR generators

---
 test/test_sfg_generators.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test/test_sfg_generators.py b/test/test_sfg_generators.py
index 699ba682..7b4755dc 100644
--- a/test/test_sfg_generators.py
+++ b/test/test_sfg_generators.py
@@ -57,6 +57,13 @@ def test_direct_form_fir():
         len([comp for comp in sfg.components if isinstance(comp, Delay)]) == 2
     )
 
+    sfg = direct_form_fir(
+        (0.3, 0.4, 0.5, 0.6, 0.3),
+        mult_properties={'latency': 2, 'execution_time': 1},
+        add_properties={'latency': 1, 'execution_time': 1},
+    )
+    assert sfg.critical_path() == 6
+
 
 def test_transposed_direct_form_fir():
     sfg = transposed_direct_form_fir([0.3, 0.5, 0.7])
@@ -77,3 +84,10 @@ def test_transposed_direct_form_fir():
     assert (
         len([comp for comp in sfg.components if isinstance(comp, Delay)]) == 2
     )
+
+    sfg = transposed_direct_form_fir(
+        (0.3, 0.4, 0.5, 0.6, 0.3),
+        mult_properties={'latency': 2, 'execution_time': 1},
+        add_properties={'latency': 1, 'execution_time': 1},
+    )
+    assert sfg.critical_path() == 3
-- 
GitLab