[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] test: Add parse_port_qualifier.
From: |
Jan (janneke) Nieuwenhuizen |
Subject: |
[PATCH 2/2] test: Add parse_port_qualifier. |
Date: |
Fri, 16 Sep 2022 15:14:38 +0200 |
* test/all/parse_port_qualifier: New test.
* test/all/local.mk (PARSER_TESTS): Add it.
---
test/all/local.mk | 1 +
.../parse_port_qualifier/baseline/verify.err | 4 ++
.../parse_port_qualifier.dzn | 41 +++++++++++++++++++
3 files changed, 46 insertions(+)
create mode 100644 test/all/parse_port_qualifier/baseline/verify.err
create mode 100644 test/all/parse_port_qualifier/parse_port_qualifier.dzn
diff --git a/test/all/local.mk b/test/all/local.mk
index ef22ebfdd..2f481833a 100644
--- a/test/all/local.mk
+++ b/test/all/local.mk
@@ -496,6 +496,7 @@ PARSER_TESTS = \
%D%/parse_preprocessed_foo \
%D%/parse_preprocessed_imported_bar \
%D%/parse_preprocessed_imported_baz \
+ %D%/parse_port_qualifier \
%D%/wf_actionNotInOnEvent \
%D%/wf_actionValueDiscarded \
%D%/wf_assignmentExpressionNotInEventInstance \
diff --git a/test/all/parse_port_qualifier/baseline/verify.err
b/test/all/parse_port_qualifier/baseline/verify.err
new file mode 100644
index 000000000..40a833965
--- /dev/null
+++ b/test/all/parse_port_qualifier/baseline/verify.err
@@ -0,0 +1,4 @@
+test/all/parse_port_qualifier/parse_port_qualifier.dzn:32:3: error: provides
port `h1' cannot be external
+test/all/parse_port_qualifier/parse_port_qualifier.dzn:33:3: error: provides
port `h2' cannot be injected
+test/all/parse_port_qualifier/parse_port_qualifier.dzn:34:3: error: provides
port `h3' cannot be external
+test/all/parse_port_qualifier/parse_port_qualifier.dzn:34:3: error: provides
port `h3' cannot be injected
diff --git a/test/all/parse_port_qualifier/parse_port_qualifier.dzn
b/test/all/parse_port_qualifier/parse_port_qualifier.dzn
new file mode 100644
index 000000000..4899e90fb
--- /dev/null
+++ b/test/all/parse_port_qualifier/parse_port_qualifier.dzn
@@ -0,0 +1,41 @@
+// Dezyne --- Dezyne command line tools
+//
+// Copyright © 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+//
+// This file is part of Dezyne.
+//
+// Dezyne is free software: you can redistribute it and/or modify it
+// under the terms of the GNU Affero General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// Dezyne is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public
+// License along with Dezyne. If not, see <http://www.gnu.org/licenses/>.
+
+interface ihello
+{
+ in void hello ();
+ behavior
+ {
+ on hello: {}
+ }
+}
+
+component parse_port_qualifier
+{
+ provides ihello h0;
+ provides external ihello h1;
+ provides injected ihello h2;
+ provides external injected ihello h3;
+ requires ihello w0;
+ requires external ihello w1;
+ requires injected ihello w2;
+ requires external injected ihello w3;
+
+ behavior {}
+}
--
2.35.1