Skip to content

Commit

Permalink
Added a few more tests related to properties
Browse files Browse the repository at this point in the history
  • Loading branch information
kolovos committed Jun 7, 2024
1 parent 7757395 commit 8b3a55b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
model M1 driver EMF {nsuri="http://www.eclipse.org/emf/2002/Ecore"};
model M2 driver EMF {nsuri="http://www.eclipse.org/emf/2002/Ecore"};

var c : M1!EClass;
var p : M2!EPackage;

c.ePackage = p;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
model M driver EMF {nsuri="http://www.eclipse.org/emf/2002/Ecore"};

var c : EClass;

/*Sequence<String>*/c.ePackage.eClassifiers.name;

/*Sequence<String>*/c.ePackage.eSuperPackage.eClassifiers.name;

/*Sequence<OrderedSet<EClassifier>>*/c.ePackage.eClassifiers.ePackage.eClassifiers;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
model M driver EMF {nsuri="http://www.eclipse.org/emf/2002/Ecore"};

var c : EClass;

// This should fail as c.ePackage.eClassifiers.name is a shorthand for
// c.ePackage.eClassifiers.collect(c|c.name) and therefore not settable
c.ePackage.eClassifiers.name = new Sequence<String>;

// FIXME: I've added the line below to make the test fail until a better way
// to specify expected errors is devised
c.ePackage = c;

0 comments on commit 8b3a55b

Please sign in to comment.