Add regression tests for tasks and void function calls in expression
Check that an error is reported when either calling a task or a void function as part of an expression. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
d426e80c73
commit
fa4c67ccf7
|
|
@ -0,0 +1,14 @@
|
|||
// Check that an error is reported when a void function is used in an expression
|
||||
|
||||
module test;
|
||||
|
||||
function void f;
|
||||
endfunction
|
||||
|
||||
initial begin
|
||||
int x;
|
||||
x = f() + 1; // This should fail, void function can not be used in expression
|
||||
$display("FAILED");
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
// Check that an error is reported when a task is used in an expression
|
||||
|
||||
module test;
|
||||
|
||||
task t;
|
||||
endtask
|
||||
|
||||
initial begin
|
||||
int x;
|
||||
x = t() + 1; // This should fail, task can not be used in expression
|
||||
$display("FAILED");
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
|
@ -312,6 +312,7 @@ fr49 normal,-g2009 ivltests
|
|||
func_init_var1 normal,-g2009 ivltests
|
||||
func_init_var2 normal,-g2009 ivltests
|
||||
func_init_var3 normal,-g2009 ivltests
|
||||
func_void_in_expr_fail CE,-g2005-sv ivltests
|
||||
function10 CO,-g2005-sv ivltests
|
||||
function11 CE,-g2005-sv ivltests
|
||||
function12 normal,-g2005-sv ivltests gold=function12.gold
|
||||
|
|
|
|||
|
|
@ -1650,6 +1650,7 @@ task3.14D normal ivltests
|
|||
task3.14E normal ivltests
|
||||
task3.14F normal ivltests
|
||||
task_bypath normal ivltests # task enabled by complete path name.
|
||||
task_in_expr_fail CE ivltests
|
||||
task_inpad normal ivltests # Validates input of task should pad w/ 0
|
||||
task_iotypes normal ivltests # task ports with types.
|
||||
task_iotypes2 normal ivltests # task ports with types.
|
||||
|
|
|
|||
Loading…
Reference in New Issue