Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Oct 15, 2024
1 parent 0dce97b commit 3abc528
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test_regress/t/t_pattern_method.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2024 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0

import vltest_bootstrap

test.scenarios('simulator')

test.compile()

test.execute()

test.passes()
24 changes: 24 additions & 0 deletions test_regress/t/t_pattern_method.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2024 by Antmicro.
// SPDX-License-Identifier: CC0-1.0

class Cls;
function int get_first(int arg[2]);
return arg[0];
endfunction
endclass

module t (/*AUTOARG*/);

initial begin
Cls c = new;
int a = c.get_first('{32'd1, 32'd2});
if (a != 1) $stop;

$write("*-* All Finished *-*\n");
$finish;
end

endmodule

0 comments on commit 3abc528

Please sign in to comment.