Skip to content

Commit 3957e28

Browse files
committed
Changed test samples to adapt to new default role of rules with
parameters (viz., possibly condition)
1 parent 5a8dfb6 commit 3957e28

File tree

10 files changed

+47
-20
lines changed

10 files changed

+47
-20
lines changed

junit/control/abc.gps/a.gpr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
3-
<graph edgemode="directed" edgeids="false" role="rule" id="a">
3+
<graph role="rule" edgeids="false" edgemode="directed" id="a">
4+
<attr name="actionRole">
5+
<string>transformer</string>
6+
</attr>
47
<attr name="$version">
58
<string>curly</string>
69
</attr>
@@ -9,7 +12,7 @@
912
<string>125 59 19 19</string>
1013
</attr>
1114
</node>
12-
<edge to="n0" from="n0">
15+
<edge from="n0" to="n0">
1316
<attr name="label">
1417
<string>par:</string>
1518
</attr>

junit/control/abc.gps/b.gpr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
3-
<graph edgemode="directed" edgeids="false" role="rule" id="b">
3+
<graph role="rule" edgeids="false" edgemode="directed" id="b">
4+
<attr name="actionRole">
5+
<string>transformer</string>
6+
</attr>
47
<attr name="$version">
58
<string>curly</string>
69
</attr>
@@ -9,7 +12,7 @@
912
<string>85 82 19 19</string>
1013
</attr>
1114
</node>
12-
<edge to="n0" from="n0">
15+
<edge from="n0" to="n0">
1316
<attr name="label">
1417
<string>par:</string>
1518
</attr>

junit/control/abc.gps/c.gpr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
3-
<graph edgemode="directed" edgeids="false" role="rule" id="c">
3+
<graph role="rule" edgeids="false" edgemode="directed" id="c">
4+
<attr name="actionRole">
5+
<string>transformer</string>
6+
</attr>
47
<attr name="$version">
58
<string>curly</string>
69
</attr>
@@ -9,7 +12,7 @@
912
<string>135 89 19 19</string>
1013
</attr>
1114
</node>
12-
<edge to="n0" from="n0">
15+
<edge from="n0" to="n0">
1316
<attr name="label">
1417
<string>par:</string>
1518
</attr>

junit/control/abc.gps/d.gpr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
3-
<graph edgemode="directed" edgeids="false" role="rule" id="d">
3+
<graph role="rule" edgeids="false" edgemode="directed" id="d">
4+
<attr name="actionRole">
5+
<string>transformer</string>
6+
</attr>
47
<attr name="$version">
58
<string>curly</string>
69
</attr>
@@ -9,7 +12,7 @@
912
<string>148 88 19 19</string>
1013
</attr>
1114
</node>
12-
<edge to="n0" from="n0">
15+
<edge from="n0" to="n0">
1316
<attr name="label">
1417
<string>par:</string>
1518
</attr>

junit/control/emptyrules.gps/a.gpr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
3-
<graph edgemode="directed" edgeids="false" role="rule" id="a">
3+
<graph role="rule" edgeids="false" edgemode="directed" id="a">
4+
<attr name="actionRole">
5+
<string>transformer</string>
6+
</attr>
47
<attr name="$version">
58
<string>curly</string>
69
</attr>
@@ -9,7 +12,7 @@
912
<string>97 60 19 19</string>
1013
</attr>
1114
</node>
12-
<edge to="n0" from="n0">
15+
<edge from="n0" to="n0">
1316
<attr name="label">
1417
<string>par:</string>
1518
</attr>

junit/control/emptyrules.gps/b.gpr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
3-
<graph edgemode="directed" edgeids="false" role="rule" id="b">
3+
<graph role="rule" edgeids="false" edgemode="directed" id="b">
4+
<attr name="actionRole">
5+
<string>transformer</string>
6+
</attr>
47
<attr name="$version">
58
<string>curly</string>
69
</attr>
@@ -9,7 +12,7 @@
912
<string>90 53 19 19</string>
1013
</attr>
1114
</node>
12-
<edge to="n0" from="n0">
15+
<edge from="n0" to="n0">
1316
<attr name="label">
1417
<string>par:</string>
1518
</attr>

junit/control/emptyrules.gps/c.gpr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
3-
<graph edgemode="directed" edgeids="false" role="rule" id="c">
3+
<graph role="rule" edgeids="false" edgemode="directed" id="c">
4+
<attr name="actionRole">
5+
<string>transformer</string>
6+
</attr>
47
<attr name="$version">
58
<string>curly</string>
69
</attr>
@@ -9,7 +12,7 @@
912
<string>117 79 19 19</string>
1013
</attr>
1114
</node>
12-
<edge to="n0" from="n0">
15+
<edge from="n0" to="n0">
1316
<attr name="label">
1417
<string>par:</string>
1518
</attr>

junit/control/emptyrules.gps/d.gpr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
3-
<graph edgemode="directed" edgeids="false" role="rule" id="d">
3+
<graph role="rule" edgeids="false" edgemode="directed" id="d">
4+
<attr name="actionRole">
5+
<string>transformer</string>
6+
</attr>
47
<attr name="$version">
58
<string>curly</string>
69
</attr>
@@ -9,7 +12,7 @@
912
<string>121 81 19 19</string>
1013
</attr>
1114
</node>
12-
<edge to="n0" from="n0">
15+
<edge from="n0" to="n0">
1316
<attr name="label">
1417
<string>par:</string>
1518
</attr>

junit/control/emptyrules.gps/e.gpr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<gxl xmlns="http://www.gupro.de/GXL/gxl-1.0.dtd">
3-
<graph edgemode="directed" edgeids="false" role="rule" id="e">
3+
<graph role="rule" edgeids="false" edgemode="directed" id="e">
4+
<attr name="actionRole">
5+
<string>transformer</string>
6+
</attr>
47
<attr name="$version">
58
<string>curly</string>
69
</attr>
@@ -9,7 +12,7 @@
912
<string>91 84 19 19</string>
1013
</attr>
1114
</node>
12-
<edge to="n0" from="n0">
15+
<edge from="n0" to="n0">
1316
<attr name="label">
1417
<string>par:</string>
1518
</attr>

src/main/java/nl/utwente/groove/grammar/Rule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,9 @@ public CheckPolicy getPolicy() {
504504
* and has zero priority.
505505
*/
506506
private boolean isPropertyLike() {
507-
boolean result = !isModifying() && getPriority() == 0 && getHiddenPars().isEmpty();
507+
boolean result = !isModifying() && getPriority() == 0;
508508
if (result) {
509-
result = getSignature().stream().allMatch(v -> !v.isInOnly());
509+
result = getSignature().stream().noneMatch(UnitPar::isInOnly);
510510
}
511511
return result;
512512
}

0 commit comments

Comments
 (0)