Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-05-11 13:05:16 -0400
committerEd Willink2016-05-11 13:07:22 -0400
commitca885815f5760f89a8ae6d2eec34e0f9573fecc9 (patch)
treef8bf7e73a7fe069873466394f594693a769ec536
parent5d8b174320e5860d55b62ed09e2c2ad41e54e9d0 (diff)
downloadorg.eclipse.qvtd-ca885815f5760f89a8ae6d2eec34e0f9573fecc9.tar.gz
org.eclipse.qvtd-ca885815f5760f89a8ae6d2eec34e0f9573fecc9.tar.xz
org.eclipse.qvtd-ca885815f5760f89a8ae6d2eec34e0f9573fecc9.zip
[486722] Test ImperativeRealizedVariableCS
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Constructors/Constructors.qvti22
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/QVTiSerializeTests.java4
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Constructors/Constructors.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Constructors/Constructors.qvti
new file mode 100644
index 000000000..ce02b8922
--- /dev/null
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Constructors/Constructors.qvti
@@ -0,0 +1,22 @@
+import ecore : 'http://www.eclipse.org/emf/2002/Ecore';
+
+transformation Constructors {
+ source imports ecore;
+ target imports ecore;
+ middle imports ecore;
+}
+
+query Constructors::createEPackage(name2 : String) : ecore::EPackage {
+ ecore::EPackage{name = name2}
+}
+
+map ep2ep in Constructors {
+ check source (epIn:EPackage) {}
+ enforce target () {
+ realize epOut1 : EPackage := this.createEPackage(epIn.name),
+ realize epOut2 : EPackage
+ }
+ where () {
+ epOut2.name := epIn.name;
+ }
+}
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/QVTiSerializeTests.java b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/QVTiSerializeTests.java
index 2fca30a72..27d97f5c9 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/QVTiSerializeTests.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/QVTiSerializeTests.java
@@ -143,6 +143,10 @@ public class QVTiSerializeTests extends LoadTestCase
super.setUp();
}
+ public void testSerialize_Constructors() throws Exception {
+ doSerializeRoundTrip("Constructors/Constructors");
+ }
+
public void testSerialize_Dependencies() throws Exception {
doSerializeRoundTrip("Dependencies/Dependencies");
}

Back to the top