Set regression test for explicit enum cast to supported

Update the enum cast test to reflect that enum casts are now supported.

Also add a small check to verify that the right value got assigned to the
enum after the cast.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-01-16 10:52:46 +01:00
parent 053453c645
commit 1858c6a313
6 changed files with 20 additions and 6 deletions

View File

@ -1,4 +1,4 @@
// This is currently unsupported, but is legal code.
// Test that cast to enum works in procedural assignments
module test();
typedef enum { a, b, c } enum_type;
@ -7,6 +7,12 @@ enum_type enum_value;
initial begin
enum_value = enum_type'(1);
if (enum_value == b) begin
$display("PASSED");
end else begin
$display("FAILED");
end
end
endmodule

View File

@ -1,4 +1,4 @@
// This is currently unsupported, but is legal code.
// Test that cast to enum works in continuous assignments
module test();
typedef enum { a, b, c } enum_type;
@ -7,4 +7,12 @@ enum_type enum_value;
assign enum_value = enum_type'(1);
initial begin
if (enum_value == b) begin
$display("PASSED");
end else begin
$display("FAILED");
end
end
endmodule

View File

@ -115,8 +115,6 @@ br605b normal ivltests
br971 normal ivltests
br1005 normal ivltests
br1015b normal ivltests
br_gh130b normal ivltests
br_gh386d normal ivltests
br_ml20150315b normal ivltests
sv_deferred_assert1 normal ivltests
sv_deferred_assert2 normal ivltests

View File

@ -294,8 +294,6 @@ br605b EF ivltests
br971 EF ivltests
br1005 CE,-g2009 ivltests
br1015b CE,-g2009 ivltests
br_gh130b CE,-g2009 ivltests
br_gh386d CE,-g2009 ivltests
br_ml20150315b CE,-g2009 ivltests
sv_deferred_assert1 CE,-g2009 ivltests gold=sv_deferred_assert1.gold
sv_deferred_assert2 CE,-g2009 ivltests gold=sv_deferred_assert2.gold

View File

@ -149,6 +149,7 @@ br_gh112e normal,-g2009 ivltests
br_gh112f normal,-g2009 ivltests
br_gh129 normal,-g2009 ivltests
br_gh130a CE,-g2009 ivltests
br_gh130b normal,-g2009 ivltests
br_gh165 normal,-g2009 ivltests gold=br_gh165.gold
br_gh164a normal,-g2009 ivltests
br_gh164b normal,-g2009 ivltests
@ -184,6 +185,7 @@ br_gh374 normal,-g2009 ivltests gold=br_gh374.gold
br_gh386a normal,-g2009 ivltests
br_gh386b normal,-g2009 ivltests
br_gh386c CE,-g2009 ivltests
br_gh386d normal,-g2009 ivltests
br_gh388 normal,-g2009 ivltests gold=br_gh388.gold
br_gh391 normal,-g2009 ivltests gold=br_gh391.gold
br_gh411 normal,-g2009 ivltests

View File

@ -733,6 +733,7 @@ br_gh99r normal,-pallowsigned=1 ivltests
br_gh112e normal,-g2009,-pallowsigned=1 ivltests
br_gh112f normal,-g2009,-pallowsigned=1 ivltests
br_gh129 normal,-g2009,-pallowsigned=1 ivltests
br_gh130b normal,-g2009,-pallowsigned=1 ivltests
br_gh198 normal,-pallowsigned=1 ivltests gold=br_gh198.gold
br_gh199a normal,-pallowsigned=1 ivltests
br_gh199b normal,-pallowsigned=1 ivltests
@ -743,6 +744,7 @@ br_gh283a normal,-pallowsigned=1 ivltests
br_gh283b normal,-pallowsigned=1 ivltests
br_gh283c normal,-pallowsigned=1 ivltests
br_gh289b normal,-g2009,-pallowsigned=1 ivltests
br_gh386d normal,-g2009,-pallowsigned=1 ivltests
br_gh477 normal,-g2009,-pallowsigned=1 ivltests
br_gh540 normal,-g2009,-pallowsigned=1 ivltests
ca_mult normal,-pallowsigned=1 ivltests gold=ca_mult.gold