diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-06-09 07:43:55 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-06-09 18:31:58 +0200 |
commit | c1b1ba07599d27fe30f3814d7e01fb88b82c32db (patch) | |
tree | af04792977e4b5b835fa25f6a238b1e37656a66d /src | |
parent | aa0bd54a1de29d5e9795b7b8c249d0c7fde827a8 (diff) | |
download | ghdl-c1b1ba07599d27fe30f3814d7e01fb88b82c32db.tar.gz ghdl-c1b1ba07599d27fe30f3814d7e01fb88b82c32db.tar.bz2 ghdl-c1b1ba07599d27fe30f3814d7e01fb88b82c32db.zip |
src/ortho/oread/tests: adjust some tests (keyword in upper case).
Diffstat (limited to 'src')
-rw-r--r-- | src/ortho/oread/tests/if1.on | 22 | ||||
-rw-r--r-- | src/ortho/oread/tests/ret1.on | 12 | ||||
-rw-r--r-- | src/ortho/oread/tests/run_case1.on | 24 | ||||
-rw-r--r-- | src/ortho/oread/tests/run_case2.on | 28 |
4 files changed, 43 insertions, 43 deletions
diff --git a/src/ortho/oread/tests/if1.on b/src/ortho/oread/tests/if1.on index 16d9b9835..5cae79500 100644 --- a/src/ortho/oread/tests/if1.on +++ b/src/ortho/oread/tests/if1.on @@ -1,12 +1,12 @@ -type __ghdl_bool_type is boolean {false, true}; -type __ghdl_integer is signed (32); +TYPE __ghdl_bool_type IS BOOLEAN {FALSE, TRUE}; +TYPE __ghdl_integer IS SIGNED (32); -public function test_arg (v : __ghdl_bool_type) return __ghdl_integer -declare -begin - if v then - return __ghdl_integer'[1]; - else - return __ghdl_integer'[0]; - end if; -end; +PUBLIC FUNCTION test_arg (v : __ghdl_bool_type) RETURN __ghdl_integer +DECLARE +BEGIN + IF v THEN + RETURN __ghdl_integer'[1]; + ELSE + RETURN __ghdl_integer'[0]; + END IF; +END; diff --git a/src/ortho/oread/tests/ret1.on b/src/ortho/oread/tests/ret1.on index 02137048c..42d1f31e2 100644 --- a/src/ortho/oread/tests/ret1.on +++ b/src/ortho/oread/tests/ret1.on @@ -1,7 +1,7 @@ -type __ghdl_integer is signed (32); +TYPE __ghdl_integer IS SIGNED (32); -public function test_assign () return __ghdl_integer -declare -begin - return __ghdl_integer'[5]; -end; +PUBLIC FUNCTION test_assign () RETURN __ghdl_integer +DECLARE +BEGIN + RETURN __ghdl_integer'[5]; +END; diff --git a/src/ortho/oread/tests/run_case1.on b/src/ortho/oread/tests/run_case1.on index d457e59ba..c6c281bb0 100644 --- a/src/ortho/oread/tests/run_case1.on +++ b/src/ortho/oread/tests/run_case1.on @@ -1,13 +1,13 @@ -type __ghdl_index_type is unsigned (32); -type __ghdl_bool_type is boolean {false, true}; +TYPE __ghdl_index_type IS UNSIGNED (32); +TYPE __ghdl_bool_type IS BOOLEAN {false, true}; -public function main (a : __ghdl_index_type) return __ghdl_index_type -declare -begin - case a is - when 1 => - return 2; - when default => - return 0; - end case; -end; +PUBLIC FUNCTION main (a : __ghdl_index_type) RETURN __ghdl_index_type +DECLARE +BEGIN + CASE a IS + WHEN 1 => + RETURN 2; + WHEN DEFAULT => + RETURN 0; + END CASE; +END; diff --git a/src/ortho/oread/tests/run_case2.on b/src/ortho/oread/tests/run_case2.on index 6707f4f96..5caa705cb 100644 --- a/src/ortho/oread/tests/run_case2.on +++ b/src/ortho/oread/tests/run_case2.on @@ -1,15 +1,15 @@ -type __ghdl_index_type is unsigned (32); -type __ghdl_bool_type is boolean {false, true}; +TYPE __ghdl_index_type IS UNSIGNED (32); +TYPE __ghdl_bool_type IS BOOLEAN {false, true}; -public function main (a : __ghdl_index_type) return __ghdl_index_type -declare -begin - case a is - when 1 => - return 2; - when 3 ... 5 => - return 1; - when default => - return 0; - end case; -end; +PUBLIC FUNCTION main (a : __ghdl_index_type) RETURN __ghdl_index_type +DECLARE +BEGIN + CASE a IS + WHEN 1 => + RETURN 2; + WHEN 3 ... 5 => + RETURN 1; + WHEN DEFAULT => + RETURN 0; + END CASE; +END; |