1#!/usr/bin/env perl
2if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
3# DESCRIPTION: Verilator: Verilog Test driver/expect definition
4#
5# Copyright 2012 by Wilson Snyder. This program is free software; you
6# can redistribute it and/or modify it under the terms of either the GNU
7# Lesser General Public License Version 3 or the Perl Artistic License
8# Version 2.0.
9# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
10
11scenarios(vlt => 1);
12
13my $out_filename = "$Self->{obj_dir}/V$Self->{name}.xml";
14
15top_filename("t/t_enum_type_methods.v");
16
17compile(
18    verilator_flags2 => ['--debug-check', '--flatten'],
19    verilator_make_gmake => 0,
20    make_top_shell => 0,
21    make_main => 0,
22    );
23
24files_identical("$out_filename", $Self->{golden_filename}, 'logfile');
25
26# make sure that certain tags are present in --debug-check
27# that would not be present in --xml-only
28file_grep("$out_filename", qr/<constpool /x);
29file_grep("$out_filename", qr/<inititem /x);
30file_grep("$out_filename", qr/<if /x);
31file_grep("$out_filename", qr/<while /x);
32file_grep("$out_filename", qr/<begin>/x);  # for <if> and <while>
33file_grep("$out_filename", qr/ signed=/x);  # for <basicdtype>
34file_grep("$out_filename", qr/ func=/x);  # for <ccall>
35
36ok(1);
371;
38