diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-07-25 09:01:06 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-07-25 11:28:50 +0200 |
commit | 5716ac056b0bbcec8bc6059843a21a3eb36c653d (patch) | |
tree | 7f7047811c611d53efc8c71301be0e82e16afa82 /src/ortho | |
parent | 071611db8906f0577e74886d9f8304dc982174c2 (diff) | |
download | ghdl-5716ac056b0bbcec8bc6059843a21a3eb36c653d.tar.gz ghdl-5716ac056b0bbcec8bc6059843a21a3eb36c653d.tar.bz2 ghdl-5716ac056b0bbcec8bc6059843a21a3eb36c653d.zip |
ortho/oread/tests: adjust one more test.
Diffstat (limited to 'src/ortho')
-rw-r--r-- | src/ortho/oread/tests/test_incomp.on | 23 | ||||
-rw-r--r-- | src/ortho/oread/tests/test_incomp2.on | 17 |
2 files changed, 28 insertions, 12 deletions
diff --git a/src/ortho/oread/tests/test_incomp.on b/src/ortho/oread/tests/test_incomp.on index 3cd631562..89f476399 100644 --- a/src/ortho/oread/tests/test_incomp.on +++ b/src/ortho/oread/tests/test_incomp.on @@ -1,17 +1,16 @@ -type int is signed (32); -type bool is boolean { false, true }; +TYPE int IS SIGNED (32); +TYPE bool IS BOOLEAN { false, true }; -type incomp_ptr is access; -type rec is record +TYPE incomp_ptr IS ACCESS; +TYPE rec IS RECORD nxt : incomp_ptr; val : int; -end record; +END RECORD; -type incomp_ptr is access rec; - -public function eq (l : incomp_ptr; r : incomp_ptr) return bool -declare -begin - return bool'(l.all.val = r.all.val); -end; +TYPE incomp_ptr IS ACCESS rec; +PUBLIC FUNCTION eq (l : incomp_ptr; r : incomp_ptr) RETURN bool +DECLARE +BEGIN + RETURN bool'(l.ALL.val = r.ALL.val); +END; diff --git a/src/ortho/oread/tests/test_incomp2.on b/src/ortho/oread/tests/test_incomp2.on new file mode 100644 index 000000000..f951f37a0 --- /dev/null +++ b/src/ortho/oread/tests/test_incomp2.on @@ -0,0 +1,17 @@ +TYPE int IS SIGNED (32); +TYPE bool IS BOOLEAN { false, true }; + +TYPE rec IS RECORD; + +TYPE incomp_ptr IS ACCESS rec; + +TYPE rec IS RECORD + nxt : incomp_ptr; + val : int; +END RECORD; + +PUBLIC FUNCTION eq (l : incomp_ptr; r : incomp_ptr) RETURN bool +DECLARE +BEGIN + RETURN bool'(l.ALL.val = r.ALL.val); +END; |