aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/types/array-types/colors_2d_array.vhdl
blob: c3da438e15565699b2513c66e3a0e59cc7e3a335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
entity test is
end test;

architecture only of test is
  type colors is ( 'R', 'O', 'Y', 'G', 'B', 'I', 'V', 'X' );
  type color_table_t is array ( 1 to 3, 1 to 3 ) of colors;
  CONSTANT primary_table : color_table_t := (
    -- 'R' 'B' 'Y'
    ( 'R', 'V', 'O' ),  -- 'R'
    ( 'V', 'B', 'G' ),  -- 'B'
    ( 'O', 'G', 'Y' )   -- 'Y'
  );
begin  -- only
  test: process
  begin  -- process test
    assert primary_table( 1, 1 ) = 'R' report "TEST FAILED" severity failure;
    assert primary_table( 1, 2 ) = 'V' report "TEST FAILED" severity failure;
    assert primary_table( 1, 3 ) = 'O' report "TEST FAILED" severity failure;
    assert primary_table( 2, 1 ) = 'V' report "TEST FAILED" severity failure;
    assert primary_table( 2, 2 ) = 'B' report "TEST FAILED" severity failure;
    assert primary_table( 2, 3 ) = 'G' report "TEST FAILED" severity failure;
    assert primary_table( 3, 1 ) = 'O' report "TEST FAILED" severity failure;
    assert primary_table( 3, 2 ) = 'G' report "TEST FAILED" severity failure;
    assert primary_table( 3, 3 ) = 'Y' report "TEST FAILED" severity failure;

    report "TEST PASSED";
    wait;
  end process test;
end only;