From e7f223da0ad86e2e00074302256aa43b43a83e9c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 8 Dec 2016 05:31:45 +0100 Subject: Add tests for oread (some are old) --- src/ortho/oread/tests/run_idx.on | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/ortho/oread/tests/run_idx.on (limited to 'src/ortho/oread/tests/run_idx.on') diff --git a/src/ortho/oread/tests/run_idx.on b/src/ortho/oread/tests/run_idx.on new file mode 100644 index 000000000..9e12acbd7 --- /dev/null +++ b/src/ortho/oread/tests/run_idx.on @@ -0,0 +1,17 @@ +type __ghdl_index_type is unsigned (32); +type __ghdl_bool_type is boolean {false, true}; + +type __ghdl_char is unsigned (8); + +type __ghdl_chararray is array [__ghdl_index_type] of __ghdl_index_type; + +private constant TAB : subarray __ghdl_chararray[__ghdl_index_type'[10] + ]; + +constant TAB := {65, 66, 67, 68, 69, 48, 49, 50, 51, 52 }; + +public function main (a : __ghdl_index_type) return __ghdl_index_type +declare +begin + return TAB[a]; +end; -- cgit v1.2.3