Add regression test for string substr() arity error
Check that a string substr() call with too few arguments is rejected with a normal compile error. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
55d78cf1a8
commit
d246979d26
|
|
@ -0,0 +1,10 @@
|
|||
// Check that string substr() rejects too few arguments.
|
||||
|
||||
module test;
|
||||
string s;
|
||||
string t;
|
||||
|
||||
initial begin
|
||||
t = s.substr(0);
|
||||
end
|
||||
endmodule
|
||||
|
|
@ -374,6 +374,7 @@ sv_queue_method_push_back_too_few_arg_fail vvp_tests/sv_queue_method_push_back_t
|
|||
sv_queue_method_push_back_too_many_arg_fail vvp_tests/sv_queue_method_push_back_too_many_arg_fail.json
|
||||
sv_queue_method_push_front_too_few_arg_fail vvp_tests/sv_queue_method_push_front_too_few_arg_fail.json
|
||||
sv_queue_method_push_front_too_many_arg_fail vvp_tests/sv_queue_method_push_front_too_many_arg_fail.json
|
||||
sv_string_method_substr_too_few_arg_fail vvp_tests/sv_string_method_substr_too_few_arg_fail.json
|
||||
sv_soft_packed_union vvp_tests/sv_soft_packed_union.json
|
||||
sv_soft_packed_union_fail1 vvp_tests/sv_soft_packed_union_fail1.json
|
||||
sv_super_member_fail vvp_tests/sv_super_member_fail.json
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"type" : "CE",
|
||||
"source" : "sv_string_method_substr_too_few_arg_fail.v",
|
||||
"iverilog-args" : [ "-g2005-sv" ]
|
||||
}
|
||||
Loading…
Reference in New Issue