-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a regression test for another driver corner case
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package pack is | ||
type t_nat_vec is array (natural range <>) of natural; | ||
function count_drivers (inputs : t_nat_vec) return natural; | ||
subtype t_rnat is count_drivers natural; | ||
end package; | ||
|
||
package body pack is | ||
function count_drivers (inputs : t_nat_vec) return natural is | ||
begin | ||
return inputs'length; | ||
end function; | ||
end package body; | ||
|
||
------------------------------------------------------------------------------- | ||
|
||
use work.pack.all; | ||
|
||
entity sub is | ||
port ( o : out t_rnat ); | ||
end entity; | ||
|
||
architecture three_drivers of sub is | ||
begin | ||
o <= 6; | ||
o <= 52; | ||
o <= 99; | ||
postponed assert o = 3; | ||
end architecture; | ||
|
||
architecture no_drivers of sub is | ||
begin | ||
postponed assert o = 0; | ||
end architecture; | ||
|
||
------------------------------------------------------------------------------- | ||
|
||
entity driver18 is | ||
end entity; | ||
|
||
use work.pack.all; | ||
|
||
architecture test of driver18 is | ||
signal s : t_rnat; | ||
begin | ||
|
||
u1: entity work.sub(three_drivers) | ||
port map ( s ); | ||
|
||
u2: entity work.sub(no_drivers) | ||
port map ( s ); | ||
|
||
s <= 777; | ||
s <= 100; | ||
|
||
postponed assert s = 4; | ||
|
||
end architecture; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -847,3 +847,4 @@ value4 fail,2019,gold | |
open1 normal,2019 | ||
issue750 normal,2008 | ||
order3 shell | ||
driver18 normal,2008 |