Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2019-01-05 13:36:42 +0000
committerEd Willink2019-01-14 12:03:23 +0000
commit35030f68928bd6dd9d4a792a3ad40b25d07bb19b (patch)
tree97c06f20a46b4ffc271abd996241a1dae117883b
parentb49229a2c3fe557e3b0b1f1a0d2797c13ee8806e (diff)
downloadorg.eclipse.ocl-35030f68928bd6dd9d4a792a3ad40b25d07bb19b.tar.gz
org.eclipse.ocl-35030f68928bd6dd9d4a792a3ad40b25d07bb19b.tar.xz
org.eclipse.ocl-35030f68928bd6dd9d4a792a3ad40b25d07bb19b.zip
[543187] Failing test case
-rw-r--r--tests/org.eclipse.ocl.examples.xtext.tests/models/ecore/Bug543187.ecore33
-rw-r--r--tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/pivot/tests/ValidateTests.java16
2 files changed, 49 insertions, 0 deletions
diff --git a/tests/org.eclipse.ocl.examples.xtext.tests/models/ecore/Bug543187.ecore b/tests/org.eclipse.ocl.examples.xtext.tests/models/ecore/Bug543187.ecore
new file mode 100644
index 0000000000..ed055361ce
--- /dev/null
+++ b/tests/org.eclipse.ocl.examples.xtext.tests/models/ecore/Bug543187.ecore
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ name="bug543187" nsURI="http://Bug543187" nsPrefix="bug543187">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="invocationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ <details key="settingDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ <details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="ModelElement" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="reference" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ changeable="false" volatile="true" transient="true" defaultValueLiteral="false" derived="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
+ <details key="derivation" value="self.Link->notEmpty()"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Link" abstract="true">
+ <eTypeParameters name="T">
+ <eBounds eClassifier="#//ModelElement"/>
+ </eTypeParameters>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="to" lowerBound="1">
+ <eGenericType eTypeParameter="#//Link/T"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Mapping">
+ <eTypeParameters name="T">
+ <eBounds eClassifier="#//ModelElement"/>
+ </eTypeParameters>
+ <eGenericSuperTypes eClassifier="#//Link">
+ <eTypeArguments eTypeParameter="#//Mapping/T"/>
+ </eGenericSuperTypes>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/pivot/tests/ValidateTests.java b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/pivot/tests/ValidateTests.java
index db590711e4..50c26a6443 100644
--- a/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/pivot/tests/ValidateTests.java
+++ b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/pivot/tests/ValidateTests.java
@@ -215,6 +215,22 @@ public class ValidateTests extends AbstractValidateTests
ocl.dispose();
}
+ public void testValidate_Bug543187_ecore() throws IOException, InterruptedException {
+ //
+ // Create model
+ //
+ OCL ocl = OCL.newInstance(getProjectMap());
+ URI ecoreURI = getTestModelURI("models/ecore//Bug543187.ecore");
+ Resource ecoreResource = ocl.getResourceSet().getResource(ecoreURI, true);
+ assert ecoreResource != null;
+ //
+ // Check EObjectValidator errors
+ //
+ assertEcoreOCLValidationDiagnostics(ocl, "Ecore Load", ecoreResource);
+ //
+ ocl.dispose();
+ }
+
public void testValidate_Pivot_ecore() throws IOException, InterruptedException {
//
// Create model

Back to the top