diff options
-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; |