Add regression test for invalid net data types

Add regression tests that check that declaring a net of type class, dynamic
array, queue or string result in an error.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-02-28 10:25:16 +01:00
parent f67cdddecf
commit 2921e66105
5 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,12 @@
// Check that declaring a net of a class type results in an error
module test;
class C;
endclass
wire C x;
initial begin
$display("FAILED");
end
endmodule

View File

@ -0,0 +1,10 @@
// Check that declaring a net of a dynamic array type results in an error
module test;
wire x[];
initial begin
$display("FAILED");
end
endmodule

View File

@ -0,0 +1,10 @@
// Check that declaring a net of a queue type results in an error
module test;
wire x[$];
initial begin
$display("FAILED");
end
endmodule

View File

@ -0,0 +1,10 @@
// Check that declaring a net of string type results in an error
module test;
wire string x;
initial begin
$display("FAILED");
end
endmodule

View File

@ -318,6 +318,10 @@ named_begin normal,-g2009 ivltests
named_begin_fail CE,-g2009 ivltests
named_fork normal,-g2009 ivltests
named_fork_fail CE,-g2009 ivltests
net_class_fail CE,-g2005-sv ivltests
net_darray_fail CE,-g2005-sv ivltests
net_queue_fail CE,-g2005-sv ivltests
net_string_fail CE,-g2005-sv ivltests
packeda normal,-g2009 ivltests
packeda2 normal,-g2009 ivltests
parameter_in_generate2 CE,-g2005-sv ivltests