mirror of
https://github.com/verilator/verilator.git
synced 2025-01-31 18:54:03 +00:00
Check the output in t_class_method_str_literal.v (#4459)
This commit is contained in:
parent
91227d26bb
commit
1a1f919882
@ -7,21 +7,21 @@
|
|||||||
module t;
|
module t;
|
||||||
|
|
||||||
class T;
|
class T;
|
||||||
function automatic void print_str(input string a_string);
|
function automatic string return_str(input string a_string);
|
||||||
$display(a_string);
|
return a_string;
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
static function automatic void static_print_str(input string a_string);
|
static function automatic string static_return_str(input string a_string);
|
||||||
$display(a_string);
|
return a_string;
|
||||||
endfunction
|
endfunction
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
T t_c = new;
|
T t_c = new;
|
||||||
t_c.print_str("function though member");
|
if (t_c.return_str("A") != "A") $stop;
|
||||||
t_c.static_print_str("static function through member");
|
if (t_c.static_return_str("B") != "B") $stop;
|
||||||
T::static_print_str("static function through class");
|
if (T::static_return_str("C") != "C") $stop;
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user