diff options
Diffstat (limited to 'tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Sequence_Operation.alf')
-rw-r--r-- | tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Sequence_Operation.alf | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Sequence_Operation.alf b/tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Sequence_Operation.alf index 03627ae4b3f..5fa5b444075 100644 --- a/tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Sequence_Operation.alf +++ b/tests/junit/plugins/uml/alf/org.eclipse.papyrus.uml.alf.tests/tests/Expressions_Sequence_Operation.alf @@ -1,55 +1,55 @@ -/**
- * Test sequence operation expressions.
- **/
-active class Expressions_Sequence_Operation {
-
- // Supporting declarations *************************************************
-
- class Customer {
- public name: String;
- @Create Customer(in name: String) { this.name = name; }
- }
-
- //**************************************************************************
-
- test(
- out notEmpty: Boolean, out includes: Boolean, out m: Integer, out n: Integer,
- out customers: Customer[*], out list: any[*]) {
-
- customer = new Customer("A");
- customers = Customer[]{};
-
- notEmpty = customers->notEmpty();
- customers->notEmpty(); // Check that notEmpty is still resolvable as a behavior.
- includes = customers->includes(customer);
- customers = customers->including(customer);
- customers->add(new Customer("B"));
- customers->add(new Customer("C"));
- customers->add(customer);
- customers->removeAt(2);
- customers->remove(customer);
-
- m = Customer->size();
- n = Customer.allInstances()->size();
-
- list = null; // Type is "any".
- list = list->including(customer);
- list->add(customer);
- list->add("Blah");
- list->add(1);
- list->removeAll(customer);
- }
-
-} do {
- this.test(notEmpty, includes, n, m, customers, list);
-
-// AssertFalse("notEmpty", notEmpty);
-// AssertFalse("includes", includes);
-// AssertEqual("n", n, 3);
-// AssertEqual("m", m, 3);
-//
-// AssertList("customers.name", customers.name, "C");
-// AssertList("list", list, any[]{"Blah", 1});
-
- WriteLine("Done");
+/** + * Test sequence operation expressions. + **/ +active class Expressions_Sequence_Operation { + + // Supporting declarations ************************************************* + + class Customer { + public name: String; + @Create Customer(in name: String) { this.name = name; } + } + + //************************************************************************** + + test( + out notEmpty: Boolean, out includes: Boolean, out m: Integer, out n: Integer, + out customers: Customer[*], out list: any[*]) { + + customer = new Customer("A"); + customers = Customer[]{}; + + notEmpty = customers->notEmpty(); + customers->notEmpty(); // Check that notEmpty is still resolvable as a behavior. + includes = customers->includes(customer); + customers = customers->including(customer); + customers->add(new Customer("B")); + customers->add(new Customer("C")); + customers->add(customer); + customers->removeAt(2); + customers->remove(customer); + + m = Customer->size(); + n = Customer.allInstances()->size(); + + list = null; // Type is "any". + list = list->including(customer); + list->add(customer); + list->add("Blah"); + list->add(1); + list->removeAll(customer); + } + +} do { + this.test(notEmpty, includes, n, m, customers, list); + +// AssertFalse("notEmpty", notEmpty); +// AssertFalse("includes", includes); +// AssertEqual("n", n, 3); +// AssertEqual("m", m, 3); +// +// AssertList("customers.name", customers.name, "C"); +// AssertList("list", list, any[]{"Blah", 1}); + + WriteLine("Done"); }
\ No newline at end of file |