Add regression test for empty old-style UDP table

Check that an empty old-style UDP table reports the parser error and the
invalid primitive error instead of crashing.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2026-06-19 21:43:57 -07:00
parent 20a969bf38
commit d5a16b31a1
4 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,2 @@
ivltests/udp_empty_table_fail.v:7: error: Empty UDP table.
ivltests/udp_empty_table_fail.v:3: error: Invalid table for UDP primitive udp_empty_table_fail.

View File

@ -0,0 +1,9 @@
// Check that an empty old-style UDP table generates an error.
primitive udp_empty_table_fail (o, i);
output o;
input i;
table
endtable
endprimitive

View File

@ -389,6 +389,7 @@ test_va_math vvp_tests/test_va_math.json
test_vams_math vvp_tests/test_vams_math.json
timing_check_syntax vvp_tests/timing_check_syntax.json
timing_check_delayed_signals vvp_tests/timing_check_delayed_signals.json
udp_empty_table_fail vvp_tests/udp_empty_table_fail.json
uwire_fail2 vvp_tests/uwire_fail2.json
uwire_fail3 vvp_tests/uwire_fail3.json
value_range1 vvp_tests/value_range1.json

View File

@ -0,0 +1,5 @@
{
"type" : "CE",
"source" : "udp_empty_table_fail.v",
"gold" : "udp_empty_table_fail"
}