From 086c50763d64125a4ccc0c9a2f2727154b8e1e86 Mon Sep 17 00:00:00 2001 From: Michael Baier Date: Thu, 9 Jul 2026 11:58:07 +0200 Subject: [PATCH] Tescases for Width Limit, Resize and Overflow --- tests/rtlil/bug1206_memory.ys | 6 ++++++ tests/rtlil/bug1206_memory_overflow.ys | 6 ++++++ tests/rtlil/bug1206_overflow.ys | 6 ++++++ tests/unit/kernel/rtlilTest.cc | 22 ++++++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 tests/rtlil/bug1206_memory.ys create mode 100644 tests/rtlil/bug1206_memory_overflow.ys create mode 100644 tests/rtlil/bug1206_overflow.ys diff --git a/tests/rtlil/bug1206_memory.ys b/tests/rtlil/bug1206_memory.ys new file mode 100644 index 000000000..b747a195c --- /dev/null +++ b/tests/rtlil/bug1206_memory.ys @@ -0,0 +1,6 @@ +logger -expect error "Memory width .* out of range" 1 +read_rtlil < mod = std::make_unique(); + EXPECT_DEATH(mod->addWire(ID(test), RTLIL::WIDTH_LIMIT), ""); + EXPECT_NO_FATAL_FAILURE(mod->addWire(ID(test), RTLIL::WIDTH_LIMIT - 1)); + } + TEST_F(KernelRtlilTest, ConstEqualStr) { EXPECT_EQ(Const("abc"), Const("abc")); EXPECT_NE(Const("abc"), Const("def"));