Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Dec 12, 2024
1 parent 6555f20 commit 9baeb2e
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test_regress/t/t_class_eq_wild.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()
22 changes: 22 additions & 0 deletions test_regress/t/t_class_eq_wild.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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 A;
endclass

module t (/*AUTOARG*/);

initial begin
A a1 = new;
A a2 = new;
if (a1 ==? a2) $stop;
if (!a1 !=? a2) $stop;

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

endmodule
18 changes: 18 additions & 0 deletions test_regress/t/t_inside_queue_elem.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()
18 changes: 18 additions & 0 deletions test_regress/t/t_inside_queue_elem.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// 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

module t (/*AUTOARG*/);

initial begin
int q[$] = {1, 2};
if (!(1 inside {q[0], q[1]})) $stop;
if (3 inside {q[0], q[1]}) $stop;

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

endmodule

0 comments on commit 9baeb2e

Please sign in to comment.