Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Template.alf')
-rw-r--r--tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Template.alf156
1 files changed, 78 insertions, 78 deletions
diff --git a/tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Template.alf b/tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Template.alf
index 475bf7cac0a..b09f4f01202 100644
--- a/tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Template.alf
+++ b/tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Template.alf
@@ -1,79 +1,79 @@
-/**
- * Test expressions involving templates.
- **/
-active class Expressions_Template {
-
- public receive signal Continue { }
-
- public activity A<T specializes B>(in x: T): Integer {
- return x.i;
- }
-
- public class B {
- public i: Integer;
- @Create public B(in i: Integer) { this.i = i; }
- }
-
- public class C<T> {
- p: T;
-
- @Create public C(in p: T) { this.p = p; }
- r(): T { return this.p; }
-
- activity E(in x: T): T { return x; }
- }
-
- public active class H<T> {
- public a: T;
- public b: T;
- public t: TestRunner;
- @Create public H(in a: T, in t: TestRunner) {
- this.a = a;
- this.t = t;
- }
- } do {
- $(this.b = new C<T>(this.a).r());
- this.t.Continue();
- }
-
- public active class TestRunner {
- public receive signal Start { }
- public receive signal Continue { }
-
- public test(
- out i: Integer, out j: Integer, out h: H<B>,
- out s: Set<Integer>, out list: List<Integer>
- ) {
-
- b = new B(1);
-
- i = A<B>(b);
- j = C<B>.E(b).i;
- h = new H<B>(b, this);
-
- s = new Set<Integer>(null);
- s.add(1);
-
- list = List<Integer>{1, 2, 3};
- }
-
- } do {
- /*
- accept (Start);
- this.test(i, j, h, s, list);
- accept (Continue);
-
- AssertEqual("i", i, 1);
- AssertEqual("j", j, 1);
- AssertEqual("h.b.i", h.b.i, 1);
-
- AssertList("s", s.toSequence(), 1);
- AssertList("list", list.toSequence(), Integer[]{1,2,3});
-
- WriteLine("Done");
- */
- }
-
-} do {
- new TestRunner().Start();
+/**
+ * Test expressions involving templates.
+ **/
+active class Expressions_Template {
+
+ public receive signal Continue { }
+
+ public activity A<T specializes B>(in x: T): Integer {
+ return x.i;
+ }
+
+ public class B {
+ public i: Integer;
+ @Create public B(in i: Integer) { this.i = i; }
+ }
+
+ public class C<T> {
+ p: T;
+
+ @Create public C(in p: T) { this.p = p; }
+ r(): T { return this.p; }
+
+ activity E(in x: T): T { return x; }
+ }
+
+ public active class H<T> {
+ public a: T;
+ public b: T;
+ public t: TestRunner;
+ @Create public H(in a: T, in t: TestRunner) {
+ this.a = a;
+ this.t = t;
+ }
+ } do {
+ $(this.b = new C<T>(this.a).r());
+ this.t.Continue();
+ }
+
+ public active class TestRunner {
+ public receive signal Start { }
+ public receive signal Continue { }
+
+ public test(
+ out i: Integer, out j: Integer, out h: H<B>,
+ out s: Set<Integer>, out list: List<Integer>
+ ) {
+
+ b = new B(1);
+
+ i = A<B>(b);
+ j = C<B>.E(b).i;
+ h = new H<B>(b, this);
+
+ s = new Set<Integer>(null);
+ s.add(1);
+
+ list = List<Integer>{1, 2, 3};
+ }
+
+ } do {
+ /*
+ accept (Start);
+ this.test(i, j, h, s, list);
+ accept (Continue);
+
+ AssertEqual("i", i, 1);
+ AssertEqual("j", j, 1);
+ AssertEqual("h.b.i", h.b.i, 1);
+
+ AssertList("s", s.toSequence(), 1);
+ AssertList("list", list.toSequence(), Integer[]{1,2,3});
+
+ WriteLine("Done");
+ */
+ }
+
+} do {
+ new TestRunner().Start();
} \ No newline at end of file

Back to the top