forked from eclipse-epsilon/epsilon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a few more tests related to properties
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/crossModelPropertyAssignment.eol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
9 changes: 9 additions & 0 deletions
9
...ests/src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/propertyCallExpressions.eol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
11 changes: 11 additions & 0 deletions
11
...src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/unsettableCollectionProperty.eol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |