Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-10-13 13:01:51 +0000
committerEd Willink2016-10-13 15:19:19 +0000
commit808691f999c7c76f157e29d0a865e7dfcfec6839 (patch)
tree53f28152bdabbb122b70748f6801067328821b41 /tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2Reverse.qvtr
parent1b924b71e2ef31114e5ad6c78428b816cb946a3d (diff)
downloadorg.eclipse.qvtd-808691f999c7c76f157e29d0a865e7dfcfec6839.tar.gz
org.eclipse.qvtd-808691f999c7c76f157e29d0a865e7dfcfec6839.tar.xz
org.eclipse.qvtd-808691f999c7c76f157e29d0a865e7dfcfec6839.zip
[500254] Use where rather than when for optional corrolary
Diffstat (limited to 'tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2Reverse.qvtr')
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2Reverse.qvtr21
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2Reverse.qvtr b/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2Reverse.qvtr
index 22285a78c..98562e939 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2Reverse.qvtr
+++ b/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2Reverse.qvtr
@@ -24,26 +24,25 @@ package org::eclipse::qvtd::xtext::qvtrelation2::tests::forward2reverse {
*/
top relation list2list {
domain forward forwardList : DoublyLinkedList {
- name = listName : String{},
- headElement = forwardHead : Element{}
+ name = listName : String{}
};
enforce domain reverse reverseList : DoublyLinkedList {
- name = listName,
- headElement = reverseHead : Element{}
+ name = listName
};
- when {
- element2element(forwardHead, reverseHead);
+ where {
+ listHead2listHead(forwardList, reverseList);
}
}
- top relation emptyList2emptyList {
+ relation listHead2listHead {
domain forward forwardList : DoublyLinkedList {
- name = listName : String{},
- headElement = null
+ headElement = forwardHead : Element{}
};
enforce domain reverse reverseList : DoublyLinkedList {
- name = listName,
- headElement = null
+ headElement = reverseHead : Element{}
};
+ when {
+ element2element(forwardHead, reverseHead);
+ }
}
/**

Back to the top