From a9d57fe9661035b3ecd23deac8943f09edb59c03 Mon Sep 17 00:00:00 2001 From: Sebastian Zarnekow Date: Fri, 6 Feb 2015 11:37:52 +0100 Subject: [459287] Use unique package names in tests Also moved the xcore test files to an own non-source folder to prevent them from being loaded twice during the tests. Preparation for the new UniqueClassNameValidation in Xtext Change-Id: Ie99d0a92398167b8056465bad2d324c50e5ac2f6 Signed-off-by: Sebastian Zarnekow --- tests/org.eclipse.emf.test.ecore.xcore/.gitignore | 2 +- .../build.properties | 3 +- .../emf/test/ecore/xcore/ecore/EPackage1.xcore | 58 ---------------------- .../emf/test/ecore/xcore/ecore/EPackage2.xcore | 18 ------- .../emf/test/ecore/xcore/ecore/XcoreEcoreTest.java | 2 +- .../test/ecore/xcore/genmodel/GenFeatures1.xcore | 24 --------- .../test/ecore/xcore/genmodel/GenPackage1.xcore | 21 -------- .../ecore/xcore/genmodel/XcoreGenModelTest.java | 2 +- .../emf/test/ecore/xcore/scoping/Annotations.xcore | 9 ---- .../test/ecore/xcore/scoping/ClassExtends.xcore | 25 ---------- .../test/ecore/xcore/scoping/XcoreScopingTest.java | 2 +- .../xcore/validation/EClass-AtMostOneID.xcore_test | 19 ------- .../EClass-ConsistentSuperTypesConflict.xcore_test | 21 -------- ...EClass-ConsistentSuperTypesDuplicate.xcore_test | 13 ----- ...isjointFeatureAndOperationSignatures.xcore_test | 11 ---- .../EClass-NoCircularSuperTypes.xcore_test | 9 ---- .../EClass-UniqueFeatureNames.xcore_test | 19 ------- .../EClass-UniqueOperationSignatures.xcore_test | 11 ---- .../EClass-WellformedMapEntryClass.xcore_test | 10 ---- ...ellformedMapEntryNoInstanceClassName.xcore_test | 15 ------ ...EClassifier-UniqueTypeParameterNames.xcore_test | 9 ---- .../EEnum-UniqueEnumeratorLiterals.xcore_test | 11 ---- .../EEnum-UniqueEnumeratorNames.xcore_test | 11 ---- .../EGenericType-ClassNotPermitted.xcore_test | 10 ---- ...icType-ConsistentArgumentNoneAllowed.xcore_test | 10 ---- ...e-ConsistentArgumentsIncorrectNumber.xcore_test | 10 ---- ...nsistentArgumentsInvalidSubstitution.xcore_test | 19 ------- ...EGenericType-ConsistentArgumentsNone.xcore_test | 10 ---- .../EGenericType-DataTypeNotPermitted.xcore_test | 10 ---- .../validation/EGenericType-NoClass.xcore_test | 10 ---- .../EGenericType-PrimitiveTypePermitted.xcore_test | 10 ---- .../EObject-EveryMapEntryUnique.xcore_test | 12 ----- .../EOperation-UniqueParameterNames.xcore_test | 13 ----- .../EOperation-UniqueTypeParameterNames.xcore_test | 10 ---- .../EPackage-UniqueClassifierNames.xcore_test | 11 ---- .../EReference-ConsistentContainer.xcore_test | 22 -------- ...rence-ConsistentOppositeBadTransient.xcore_test | 11 ---- ...ce-ConsistentOppositeBothContainment.xcore_test | 12 ----- ...erence-ConsistentOppositeNotMatching.xcore_test | 11 ---- .../EReference-SingleContainer.xcore_test | 11 ---- .../ETypedElement-ConsistentBounds.xcore_test | 10 ---- .../test/ecore/xcore/validation/Linking.xcore_test | 8 --- .../xcore/validation/XcoreValidationTest.java | 2 +- .../emf/test/ecore/xcore/ecore/EPackage1.xcore | 58 ++++++++++++++++++++++ .../emf/test/ecore/xcore/ecore/EPackage2.xcore | 18 +++++++ .../test/ecore/xcore/genmodel/GenFeatures1.xcore | 24 +++++++++ .../test/ecore/xcore/genmodel/GenPackage1.xcore | 21 ++++++++ .../emf/test/ecore/xcore/scoping/Annotations.xcore | 9 ++++ .../test/ecore/xcore/scoping/ClassExtends.xcore | 22 ++++++++ .../xcore/validation/EClass-AtMostOneID.xcore_test | 19 +++++++ .../EClass-ConsistentSuperTypesConflict.xcore_test | 21 ++++++++ ...EClass-ConsistentSuperTypesDuplicate.xcore_test | 13 +++++ ...isjointFeatureAndOperationSignatures.xcore_test | 11 ++++ .../EClass-NoCircularSuperTypes.xcore_test | 9 ++++ .../EClass-UniqueFeatureNames.xcore_test | 19 +++++++ .../EClass-UniqueOperationSignatures.xcore_test | 11 ++++ .../EClass-WellformedMapEntryClass.xcore_test | 10 ++++ ...ellformedMapEntryNoInstanceClassName.xcore_test | 15 ++++++ ...EClassifier-UniqueTypeParameterNames.xcore_test | 9 ++++ .../EEnum-UniqueEnumeratorLiterals.xcore_test | 11 ++++ .../EEnum-UniqueEnumeratorNames.xcore_test | 11 ++++ .../EGenericType-ClassNotPermitted.xcore_test | 10 ++++ ...icType-ConsistentArgumentNoneAllowed.xcore_test | 10 ++++ ...e-ConsistentArgumentsIncorrectNumber.xcore_test | 10 ++++ ...nsistentArgumentsInvalidSubstitution.xcore_test | 19 +++++++ ...EGenericType-ConsistentArgumentsNone.xcore_test | 10 ++++ .../EGenericType-DataTypeNotPermitted.xcore_test | 10 ++++ .../validation/EGenericType-NoClass.xcore_test | 10 ++++ .../EGenericType-PrimitiveTypePermitted.xcore_test | 10 ++++ .../EObject-EveryMapEntryUnique.xcore_test | 12 +++++ .../EOperation-UniqueParameterNames.xcore_test | 13 +++++ .../EOperation-UniqueTypeParameterNames.xcore_test | 10 ++++ .../EPackage-UniqueClassifierNames.xcore_test | 11 ++++ .../EReference-ConsistentContainer.xcore_test | 22 ++++++++ ...rence-ConsistentOppositeBadTransient.xcore_test | 11 ++++ ...ce-ConsistentOppositeBothContainment.xcore_test | 12 +++++ ...erence-ConsistentOppositeNotMatching.xcore_test | 11 ++++ .../EReference-SingleContainer.xcore_test | 11 ++++ .../ETypedElement-ConsistentBounds.xcore_test | 10 ++++ .../test/ecore/xcore/validation/Linking.xcore_test | 8 +++ 80 files changed, 538 insertions(+), 540 deletions(-) delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore_test delete mode 100644 tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore_test create mode 100644 tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore_test (limited to 'tests/org.eclipse.emf.test.ecore.xcore') diff --git a/tests/org.eclipse.emf.test.ecore.xcore/.gitignore b/tests/org.eclipse.emf.test.ecore.xcore/.gitignore index 6ca7db689..05805675c 100644 --- a/tests/org.eclipse.emf.test.ecore.xcore/.gitignore +++ b/tests/org.eclipse.emf.test.ecore.xcore/.gitignore @@ -1,4 +1,4 @@ bin *.java._trace *.java_trace - +*.xtendbin \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/build.properties b/tests/org.eclipse.emf.test.ecore.xcore/build.properties index 0c8228573..732e3301e 100755 --- a/tests/org.eclipse.emf.test.ecore.xcore/build.properties +++ b/tests/org.eclipse.emf.test.ecore.xcore/build.properties @@ -5,7 +5,8 @@ bin.includes = META-INF/,\ about.ini,\ about.mappings,\ about.properties,\ - modeling32.png + modeling32.png,\ + test-models/ src.includes = about.html source.. = src/,\ src-gen/,\ diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore deleted file mode 100644 index ce36e33b9..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore +++ /dev/null @@ -1,58 +0,0 @@ -/* XPECT eNamedElement --- - EPackage { - name = 'foo' - nsURI = 'foo' - nsPrefix = 'foo' - eFactoryInstance -> EFactory #// - eClassifiers = [ - EClass { - name = 'Class1' - } - EClass { - name = 'Class2' - } - EDataType { - name = 'MyString1' - instanceClassName = 'java.lang.String' - } - EDataType { - name = 'MyString2' - instanceClassName = 'java.lang.String' - } - EEnum { - name = 'En1' - eLiterals = [ - EEnumLiteral { - name = 'lit1' - } - EEnumLiteral { - name = 'lit2' - } - ] - } - EEnum { - name = 'En2' - eLiterals = [ - EEnumLiteral { - name = 'lit1' - } - EEnumLiteral { - name = 'lit2' - } - ] - } - ] - } ---- -*/ - -package foo - -class Class1 {} -class Class2 {} - -type MyString1 wraps java.lang.String -type MyString2 wraps java.lang.String - -enum En1 { lit1, lit2 } -enum En2 { lit1, lit2 } \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore deleted file mode 100644 index 09a96839d..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore +++ /dev/null @@ -1,18 +0,0 @@ -/* XPECT eNamedElement --- - EPackage { - name = 'foo' - nsURI = 'foo' - nsPrefix = 'foo' - eFactoryInstance -> EFactory #// - eClassifiers = [ - EClass { - name = 'Bar' - } - ] - } ---- -*/ - -package foo - -class Bar {} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/XcoreEcoreTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/XcoreEcoreTest.java index fec1be7d4..bfca16496 100644 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/XcoreEcoreTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/ecore/XcoreEcoreTest.java @@ -30,7 +30,7 @@ import com.google.inject.Inject; @InjectWith(XcoreInjectorProvider.class) @RunWith(ParameterizedXtextRunner.class) -@ResourceURIs(baseDir = "src/org/eclipse/emf/test/ecore/xcore/ecore", fileExtensions = "xcore") +@ResourceURIs(baseDir = "test-models/org/eclipse/emf/test/ecore/xcore/ecore", fileExtensions = "xcore") public class XcoreEcoreTest { diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore deleted file mode 100644 index 2eed29ebd..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore +++ /dev/null @@ -1,24 +0,0 @@ -package foo - -class X -{ - /* XPECT genBase at x --- - GenFeature { - notify = 'false' - createChild = 'false' - propertySortChoices = 'true' - ecoreFeature -> EReference foo::X::x - } - --- */ - refers X x opposite y - - /* XPECT genBase at y --- - GenFeature { - notify = 'false' - createChild = 'false' - propertySortChoices = 'true' - ecoreFeature -> EReference foo::X::y - } - --- */ - refers X y opposite x -} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore deleted file mode 100644 index da7c0d731..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore +++ /dev/null @@ -1,21 +0,0 @@ -/* XPECT genBase --- - GenPackage { - prefix = 'Foo' - disposableProviderFactory = 'true' - ecorePackage -> EPackage foo - genClasses = [ - GenClass { - genPackage -> GenPackage foo.FooPackage - ecoreClass -> EClass foo::Bar - } - ] - genClassifiers -> [ - GenClass foo.Bar - ] - } ---- -*/ - -package foo - -class Bar {} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/XcoreGenModelTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/XcoreGenModelTest.java index 3e135df95..10184cbaf 100644 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/XcoreGenModelTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/genmodel/XcoreGenModelTest.java @@ -31,7 +31,7 @@ import com.google.inject.Inject; @InjectWith(XcoreInjectorProvider.class) @RunWith(ParameterizedXtextRunner.class) -@ResourceURIs(baseDir = "src/org/eclipse/emf/test/ecore/xcore/genmodel", fileExtensions = "xcore") +@ResourceURIs(baseDir = "test-models/org/eclipse/emf/test/ecore/xcore/genmodel", fileExtensions = "xcore") public class XcoreGenModelTest { diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore deleted file mode 100644 index 1ab1bbb26..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore +++ /dev/null @@ -1,9 +0,0 @@ -package foo - -annotation "http://example.org/" as myAnnotation - -// FIXME: this scope should not contain qualified names of annotations since they are only visible locally. -// !XPECT scopeAllElements at myAnnotation --> myAnnotation -@myAnnotation -class Class1 {} - diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore deleted file mode 100644 index cd8bef893..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore +++ /dev/null @@ -1,25 +0,0 @@ -package foo - -class Foo {} -class Bar {} -class Baz {} - -// FIXME: these scopes should not contain EDataTypes -/* XPECT scopeAllElements at Foo --- -Bar, Baz, Class, Class1, Class2, Class3, Foo, -foo.Bar, foo.Baz, foo.Class1, foo.Class2, foo.Class3, foo.Foo, ... ---- */ -class Class1 extends Foo {} - - -/* XPECT scopeAllElements at Foo --- -Bar, Baz, Class, Class1, Class2, Class3, Foo, -foo.Bar, foo.Baz, foo.Class1, foo.Class2, foo.Class3, foo.Foo, ... ---- */ -class Class2 extends Bar {} - -/* XPECT scopeAllElements at Foo --- -Bar, Baz, Class, Class1, Class2, Class3, Foo, -foo.Bar, foo.Baz, foo.Class1, foo.Class2, foo.Class3, foo.Foo, ... ---- */ -class Class3 {} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XcoreScopingTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XcoreScopingTest.java index bd74d3aa6..85a842534 100644 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XcoreScopingTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/scoping/XcoreScopingTest.java @@ -37,7 +37,7 @@ import com.google.inject.Inject; @InjectWith(XcoreInjectorProvider.class) @RunWith(ParameterizedXtextRunner.class) -@ResourceURIs(baseDir = "src/org/eclipse/emf/test/ecore/xcore/scoping", fileExtensions = "xcore") +@ResourceURIs(baseDir = "test-models/org/eclipse/emf/test/ecore/xcore/scoping", fileExtensions = "xcore") public class XcoreScopingTest { diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore_test deleted file mode 100644 index 1ea421a81..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore_test +++ /dev/null @@ -1,19 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class C extends A, B { }' message 'The features 'id1' and 'id2' cannot both be IDs' ---- */ - -class A -{ - id String id1 -} - -class B -{ - id String id2 -} - -class C extends A, B -{ -} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore_test deleted file mode 100644 index bb5399d23..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore_test +++ /dev/null @@ -1,21 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class D extends B, C { }' message 'The generic super types instantiate 'foo.A' inconsistently' ---- */ - -class A -{ -} - -class B extends A -{ -} - -class C extends A -{ -} - -class D extends B, C -{ -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore_test deleted file mode 100644 index de6a03023..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore_test +++ /dev/null @@ -1,13 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class B extends A, A { }' message 'The generic super types at index '1' and '0' must not be duplicates' ---- */ - -class A -{ -} - -class B extends A, A -{ -} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore_test deleted file mode 100644 index c7e54b4b7..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore_test +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class A { String a op String getA() }' message 'There may not be an operation 'foo.A.getA' with the same signature as an accessor method for feature 'foo.A.a'' ---- */ - -class A -{ - String a - op String getA() -} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore_test deleted file mode 100644 index 159afae9b..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore_test +++ /dev/null @@ -1,9 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class A extends A { }' message 'A class may not be a super type of itself' ---- */ - -class A extends A -{ -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore_test deleted file mode 100644 index 555a363a0..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore_test +++ /dev/null @@ -1,19 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class C extends A, B { }' message 'There may not be two features named 'a'' ---- */ - -class A -{ - String a -} - -class B -{ - String a -} - -class C extends A, B -{ -} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore_test deleted file mode 100644 index 836a05095..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore_test +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class A { op String a() op String a() }' message 'There may not be two operations 'foo.A.a' and 'foo.A.a' with the same signature' ---- */ - -class A -{ - op String a() - op String a() -} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore_test deleted file mode 100644 index 8b407ccc9..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class A wraps java.util.Map$Entry { }' message 'A map entry class must have a feature called 'key'' -error at 'class A wraps java.util.Map$Entry { }' message 'A map entry class must have a feature called 'value'' ---- */ - -class A wraps java.util.Map$Entry -{ -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore_test deleted file mode 100644 index 44dd4159f..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore_test +++ /dev/null @@ -1,15 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class B extends A { }' message 'A class that inherits from a map entry class must have instance class name 'java.util.Map$Entry'' ---- */ - -class A wraps java.util.Map$Entry -{ - String key - String value -} - -class B extends A -{ -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore_test deleted file mode 100644 index a94827834..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore_test +++ /dev/null @@ -1,9 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class A { }' message 'There may not be two type parameters named 'T'' ---- */ - -class A -{ -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore_test deleted file mode 100644 index 758d88073..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore_test +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'A as 'x'' message 'There may not be two enumerators with literal value 'x'' ---- */ - -enum A -{ - A as 'x' - B as 'x' -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore_test deleted file mode 100644 index 708b444d4..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore_test +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'A ' message 'There may not be two enumerators named 'A'' ---- */ - -enum A -{ - A - A -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore_test deleted file mode 100644 index f4540db27..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'A' message 'The generic attribute type must not refer to a class' ---- */ - -class A -{ - A a -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore_test deleted file mode 100644 index d21e830ae..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'A' message 'The generic type associated with the 'A' classifier must not have 1 argument(s) when the classifier has 0 type parameter(s)' ---- */ - -class A -{ - refers A a -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore_test deleted file mode 100644 index 78226b81c..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'A' message 'The generic type associated with the 'A' classifier must not have 1 argument(s) when the classifier has 2 type parameter(s)' ---- */ - -class A -{ - refers A a -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore_test deleted file mode 100644 index 957f7c104..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore_test +++ /dev/null @@ -1,19 +0,0 @@ - -package foo - -/* XPECT validationIssues --- -error at 'A' message 'The generic type 'foo.C' is not a valid substitution for type parameter 'foo.A.T'' ---- */ - -class A -{ - refers A a -} - -class B -{ -} - -class C -{ -} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore_test deleted file mode 100644 index e401addf4..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -warning at 'A' message 'The generic type associated with the 'A' classifier should have 1 type argument(s) to match the number of type parameter (s) of the classifier ' ---- */ - -class A -{ - refers A a -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore_test deleted file mode 100644 index 2cbb94619..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'String' message 'The generic reference type must not refer to a data type' ---- */ - -class A -{ - refers String a -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore_test deleted file mode 100644 index 529398c90..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'T' message 'A generic super type must refer to a class' -error at 'String' message 'A generic super type must refer to a class' ---- */ - -class A extends T, String -{ -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore_test deleted file mode 100644 index ad2c493a1..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'int' message 'The primitive type 'int' can not be used in this context' ---- */ - -class A -{ - refers A a -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore_test deleted file mode 100644 index 8de3716fe..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore_test +++ /dev/null @@ -1,12 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'x='x'' message 'The feature 'details' has a map entry at index 1 with a key that collides with that of the map entry at index 0' ---- */ - -annotation "Foo" as Foo - -@Foo(x='x', x='x') -class A -{ -} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore_test deleted file mode 100644 index b426aa3b2..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore_test +++ /dev/null @@ -1,13 +0,0 @@ -package foo - -//TODO suppress duplicate local variable error message. -/* XPECT validationIssues --- -error at 'a' message 'Duplicate local variable a' -error at 'a' message 'Duplicate local variable a' -error at 'op void foo(A a, A a)' message 'There may not be two parameters named 'a'' ---- */ - -class A -{ - op void foo(A a, A a) -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore_test deleted file mode 100644 index c1e291b37..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at ' op void foo()' message 'There may not be two type parameters named 'T'' ---- */ - -class A -{ - op void foo() -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore_test deleted file mode 100644 index 9f1375eab..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore_test +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'class A { }' message 'There may not be two classifiers named 'A'' ---- */ - -class A -{ -} - -type A wraps java.lang.String \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore_test deleted file mode 100644 index 4dff5d6e9..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore_test +++ /dev/null @@ -1,22 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'contains A a oppos it e b' message 'A containment reference of a type with a container feature foo.A.c that requires instances to be contained elsewhere cannot be populated' -error at 'contains A a opposite c' message 'A containment reference of a type with a container feature foo.A.b that requires instances to be contained elsewhere cannot be populated' ---- */ - -class A -{ - container B [1] b opposite a - container C [1] c opposite a -} - -class B -{ - contains A a opposite b -} - -class C -{ - contains A a opposite c -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore_test deleted file mode 100644 index 8d14198f0..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore_test +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'y' message 'The opposite of a transient reference must be transient if it is proxy resolving' ---- */ - -class A -{ - refers transient A x opposite y - refers A y opposite x -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore_test deleted file mode 100644 index e9c3532bf..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore_test +++ /dev/null @@ -1,12 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at ' y' message 'The opposite of a containment reference must not be a containment reference' -error at ' x' message 'The opposite of a containment reference must not be a containment reference' ---- */ - -class A -{ - contains A x opposite y - contains A y opposite x -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore_test deleted file mode 100644 index 67d332f1b..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore_test +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at ' y' message 'The opposite of the opposite may not be a reference different from this one' ---- */ - -class A -{ - refers A x opposite y - refers A y -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore_test deleted file mode 100644 index 0e1b90680..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore_test +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at ' [*]' message 'A container reference must have upper bound of 1 not -1' ---- */ - -class A -{ - contains A x opposite y - container A [*] y opposite x -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore_test deleted file mode 100644 index e927ce5a0..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore_test +++ /dev/null @@ -1,10 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at '[2..1]' message 'The lower bound 2 must be less than or equal to the upper bound 1' ---- */ - -class A -{ - String [2..1] a -} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore_test deleted file mode 100644 index 2208de2ea..000000000 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore_test +++ /dev/null @@ -1,8 +0,0 @@ -package foo - -/* XPECT validationIssues --- -error at 'baz' message 'Couldn't resolve reference to GenBase 'baz'.' -error at 'baz' message 'A generic super type must refer to a class' ---- */ - -class bar extends baz {} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/XcoreValidationTest.java b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/XcoreValidationTest.java index 9998c2c28..3242be49e 100644 --- a/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/XcoreValidationTest.java +++ b/tests/org.eclipse.emf.test.ecore.xcore/src/org/eclipse/emf/test/ecore/xcore/validation/XcoreValidationTest.java @@ -55,7 +55,7 @@ import com.google.inject.Inject; */ @InjectWith(XcoreInjectorProvider.class) @RunWith(XcoreParameterizedTestRunner.class) -@ResourceURIs(baseDir = "src/org/eclipse/emf/test/ecore/xcore/validation", fileExtensions = "xcore_test") +@ResourceURIs(baseDir = "test-models/org/eclipse/emf/test/ecore/xcore/validation", fileExtensions = "xcore_test") public class XcoreValidationTest { @InjectParameter diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore new file mode 100644 index 000000000..a77e049ff --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/ecore/EPackage1.xcore @@ -0,0 +1,58 @@ +/* XPECT eNamedElement --- + EPackage { + name = 'ePackage1' + nsURI = 'ePackage1' + nsPrefix = 'ePackage1' + eFactoryInstance -> EFactory #// + eClassifiers = [ + EClass { + name = 'Class1' + } + EClass { + name = 'Class2' + } + EDataType { + name = 'MyString1' + instanceClassName = 'java.lang.String' + } + EDataType { + name = 'MyString2' + instanceClassName = 'java.lang.String' + } + EEnum { + name = 'En1' + eLiterals = [ + EEnumLiteral { + name = 'lit1' + } + EEnumLiteral { + name = 'lit2' + } + ] + } + EEnum { + name = 'En2' + eLiterals = [ + EEnumLiteral { + name = 'lit1' + } + EEnumLiteral { + name = 'lit2' + } + ] + } + ] + } +--- +*/ + +package ePackage1 + +class Class1 {} +class Class2 {} + +type MyString1 wraps java.lang.String +type MyString2 wraps java.lang.String + +enum En1 { lit1, lit2 } +enum En2 { lit1, lit2 } \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore new file mode 100644 index 000000000..1ad2b938b --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/ecore/EPackage2.xcore @@ -0,0 +1,18 @@ +/* XPECT eNamedElement --- + EPackage { + name = 'ePackage2' + nsURI = 'ePackage2' + nsPrefix = 'ePackage2' + eFactoryInstance -> EFactory #// + eClassifiers = [ + EClass { + name = 'Bar' + } + ] + } +--- +*/ + +package ePackage2 + +class Bar {} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore new file mode 100644 index 000000000..b115d8bb6 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/genmodel/GenFeatures1.xcore @@ -0,0 +1,24 @@ +package genFeatures1 + +class X +{ + /* XPECT genBase at x --- + GenFeature { + notify = 'false' + createChild = 'false' + propertySortChoices = 'true' + ecoreFeature -> EReference genFeatures1::X::x + } + --- */ + refers X x opposite y + + /* XPECT genBase at y --- + GenFeature { + notify = 'false' + createChild = 'false' + propertySortChoices = 'true' + ecoreFeature -> EReference genFeatures1::X::y + } + --- */ + refers X y opposite x +} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore new file mode 100644 index 000000000..904a6e589 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/genmodel/GenPackage1.xcore @@ -0,0 +1,21 @@ +/* XPECT genBase --- + GenPackage { + prefix = 'GenPackage1' + disposableProviderFactory = 'true' + ecorePackage -> EPackage genPackage1 + genClasses = [ + GenClass { + genPackage -> GenPackage genPackage1.GenPackage1Package + ecoreClass -> EClass genPackage1::Bar + } + ] + genClassifiers -> [ + GenClass genPackage1.Bar + ] + } +--- +*/ + +package genPackage1 + +class Bar {} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore new file mode 100644 index 000000000..29d9227cb --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/scoping/Annotations.xcore @@ -0,0 +1,9 @@ +package annotations + +annotation "http://example.org/" as myAnnotation + +// FIXME: this scope should not contain qualified names of annotations since they are only visible locally. +// !XPECT scopeAllElements at myAnnotation --> myAnnotation +@myAnnotation +class Class1 {} + diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore new file mode 100644 index 000000000..961234a81 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/scoping/ClassExtends.xcore @@ -0,0 +1,22 @@ +package classExtends + +class Foo {} +class Bar {} +class Baz {} + +// FIXME: these scopes should not contain EDataTypes +/* XPECT scopeAllElements at Foo --- +Bar, Baz, Class, Class1, Class2, Class3, Foo, ... +--- */ +class Class1 extends Foo {} + + +/* XPECT scopeAllElements at Foo --- +Bar, Baz, Class, Class1, Class2, Class3, Foo, ... +--- */ +class Class2 extends Bar {} + +/* XPECT scopeAllElements at Foo --- +Bar, Baz, Class, Class1, Class2, Class3, Foo, ... +--- */ +class Class3 {} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore_test new file mode 100644 index 000000000..419c033fb --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-AtMostOneID.xcore_test @@ -0,0 +1,19 @@ +package atMostOneID + +/* XPECT validationIssues --- +error at 'class C extends A, B { }' message 'The features 'id1' and 'id2' cannot both be IDs' +--- */ + +class A +{ + id String id1 +} + +class B +{ + id String id2 +} + +class C extends A, B +{ +} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore_test new file mode 100644 index 000000000..efdac6913 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesConflict.xcore_test @@ -0,0 +1,21 @@ +package consistentSuperTypesConflict + +/* XPECT validationIssues --- +error at 'class D extends B, C { }' message 'The generic super types instantiate 'consistentSuperTypesConflict.A' inconsistently' +--- */ + +class A +{ +} + +class B extends A +{ +} + +class C extends A +{ +} + +class D extends B, C +{ +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore_test new file mode 100644 index 000000000..18f30a230 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-ConsistentSuperTypesDuplicate.xcore_test @@ -0,0 +1,13 @@ +package consistentSuperTypesDup + +/* XPECT validationIssues --- +error at 'class B extends A, A { }' message 'The generic super types at index '1' and '0' must not be duplicates' +--- */ + +class A +{ +} + +class B extends A, A +{ +} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore_test new file mode 100644 index 000000000..06ccb465a --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-DisjointFeatureAndOperationSignatures.xcore_test @@ -0,0 +1,11 @@ +package disjointFeatures + +/* XPECT validationIssues --- +error at 'class A { String a op String getA() }' message 'There may not be an operation 'disjointFeatures.A.getA' with the same signature as an accessor method for feature 'disjointFeatures.A.a'' +--- */ + +class A +{ + String a + op String getA() +} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore_test new file mode 100644 index 000000000..a32216cc7 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-NoCircularSuperTypes.xcore_test @@ -0,0 +1,9 @@ +package circular + +/* XPECT validationIssues --- +error at 'class A extends A { }' message 'A class may not be a super type of itself' +--- */ + +class A extends A +{ +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore_test new file mode 100644 index 000000000..56a71529c --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueFeatureNames.xcore_test @@ -0,0 +1,19 @@ +package uniqueFeatureNames + +/* XPECT validationIssues --- +error at 'class C extends A, B { }' message 'There may not be two features named 'a'' +--- */ + +class A +{ + String a +} + +class B +{ + String a +} + +class C extends A, B +{ +} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore_test new file mode 100644 index 000000000..4fe19ff61 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-UniqueOperationSignatures.xcore_test @@ -0,0 +1,11 @@ +package uniqueOperations + +/* XPECT validationIssues --- +error at 'class A { op String a() op String a() }' message 'There may not be two operations 'uniqueOperations.A.a' and 'uniqueOperations.A.a' with the same signature' +--- */ + +class A +{ + op String a() + op String a() +} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore_test new file mode 100644 index 000000000..caa421660 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryClass.xcore_test @@ -0,0 +1,10 @@ +package wellformedMapEntryClass + +/* XPECT validationIssues --- +error at 'class A wraps java.util.Map$Entry { }' message 'A map entry class must have a feature called 'key'' +error at 'class A wraps java.util.Map$Entry { }' message 'A map entry class must have a feature called 'value'' +--- */ + +class A wraps java.util.Map$Entry +{ +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore_test new file mode 100644 index 000000000..31b8f3339 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClass-WellformedMapEntryNoInstanceClassName.xcore_test @@ -0,0 +1,15 @@ +package wellformedMapEntryNoInstanceClass + +/* XPECT validationIssues --- +error at 'class B extends A { }' message 'A class that inherits from a map entry class must have instance class name 'java.util.Map$Entry'' +--- */ + +class A wraps java.util.Map$Entry +{ + String key + String value +} + +class B extends A +{ +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore_test new file mode 100644 index 000000000..456f77a88 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EClassifier-UniqueTypeParameterNames.xcore_test @@ -0,0 +1,9 @@ +package uniqueTypeParameterNames + +/* XPECT validationIssues --- +error at 'class A { }' message 'There may not be two type parameters named 'T'' +--- */ + +class A +{ +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore_test new file mode 100644 index 000000000..8cc923fb8 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorLiterals.xcore_test @@ -0,0 +1,11 @@ +package uniqueEnumLiterals + +/* XPECT validationIssues --- +error at 'A as 'x'' message 'There may not be two enumerators with literal value 'x'' +--- */ + +enum A +{ + A as 'x' + B as 'x' +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore_test new file mode 100644 index 000000000..a9162a759 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EEnum-UniqueEnumeratorNames.xcore_test @@ -0,0 +1,11 @@ +package uniqueEnumNames + +/* XPECT validationIssues --- +error at 'A ' message 'There may not be two enumerators named 'A'' +--- */ + +enum A +{ + A + A +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore_test new file mode 100644 index 000000000..ca9739274 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ClassNotPermitted.xcore_test @@ -0,0 +1,10 @@ +package classNotPermitted + +/* XPECT validationIssues --- +error at 'A' message 'The generic attribute type must not refer to a class' +--- */ + +class A +{ + A a +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore_test new file mode 100644 index 000000000..33cf01a0b --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentNoneAllowed.xcore_test @@ -0,0 +1,10 @@ +package consistentArgsNonAllowed + +/* XPECT validationIssues --- +error at 'A' message 'The generic type associated with the 'A' classifier must not have 1 argument(s) when the classifier has 0 type parameter(s)' +--- */ + +class A +{ + refers A a +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore_test new file mode 100644 index 000000000..f7081445e --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsIncorrectNumber.xcore_test @@ -0,0 +1,10 @@ +package consistentArgsIncorrectNumber + +/* XPECT validationIssues --- +error at 'A' message 'The generic type associated with the 'A' classifier must not have 1 argument(s) when the classifier has 2 type parameter(s)' +--- */ + +class A +{ + refers A a +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore_test new file mode 100644 index 000000000..4b115fce8 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsInvalidSubstitution.xcore_test @@ -0,0 +1,19 @@ + +package consistentArgsInvalidSubstitution + +/* XPECT validationIssues --- +error at 'A' message 'The generic type 'consistentArgsInvalidSubstitution.C' is not a valid substitution for type parameter 'consistentArgsInvalidSubstitution.A.T'' +--- */ + +class A +{ + refers A a +} + +class B +{ +} + +class C +{ +} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore_test new file mode 100644 index 000000000..7cae8c611 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-ConsistentArgumentsNone.xcore_test @@ -0,0 +1,10 @@ +package consistentArgsNone + +/* XPECT validationIssues --- +warning at 'A' message 'The generic type associated with the 'A' classifier should have 1 type argument(s) to match the number of type parameter (s) of the classifier ' +--- */ + +class A +{ + refers A a +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore_test new file mode 100644 index 000000000..27079a940 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-DataTypeNotPermitted.xcore_test @@ -0,0 +1,10 @@ +package datatypeNotPermitted + +/* XPECT validationIssues --- +error at 'String' message 'The generic reference type must not refer to a data type' +--- */ + +class A +{ + refers String a +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore_test new file mode 100644 index 000000000..adc0c77fa --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-NoClass.xcore_test @@ -0,0 +1,10 @@ +package noClass + +/* XPECT validationIssues --- +error at 'T' message 'A generic super type must refer to a class' +error at 'String' message 'A generic super type must refer to a class' +--- */ + +class A extends T, String +{ +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore_test new file mode 100644 index 000000000..18e5aeb33 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EGenericType-PrimitiveTypePermitted.xcore_test @@ -0,0 +1,10 @@ +package primitivePermitted + +/* XPECT validationIssues --- +error at 'int' message 'The primitive type 'int' can not be used in this context' +--- */ + +class A +{ + refers A a +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore_test new file mode 100644 index 000000000..ff800bff1 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EObject-EveryMapEntryUnique.xcore_test @@ -0,0 +1,12 @@ +package mapEntryUnique + +/* XPECT validationIssues --- +error at 'x='x'' message 'The feature 'details' has a map entry at index 1 with a key that collides with that of the map entry at index 0' +--- */ + +annotation "Foo" as Foo + +@Foo(x='x', x='x') +class A +{ +} \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore_test new file mode 100644 index 000000000..08790c785 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueParameterNames.xcore_test @@ -0,0 +1,13 @@ +package uniqueParamNames + +//TODO suppress duplicate local variable error message. +/* XPECT validationIssues --- +error at 'a' message 'Duplicate local variable a' +error at 'a' message 'Duplicate local variable a' +error at 'op void foo(A a, A a)' message 'There may not be two parameters named 'a'' +--- */ + +class A +{ + op void foo(A a, A a) +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore_test new file mode 100644 index 000000000..b089a5d35 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EOperation-UniqueTypeParameterNames.xcore_test @@ -0,0 +1,10 @@ +package uniqueTypeParamNames + +/* XPECT validationIssues --- +error at ' op void foo()' message 'There may not be two type parameters named 'T'' +--- */ + +class A +{ + op void foo() +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore_test new file mode 100644 index 000000000..be8112b22 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EPackage-UniqueClassifierNames.xcore_test @@ -0,0 +1,11 @@ +package uniqueClassifierNames + +/* XPECT validationIssues --- +error at 'class A { }' message 'There may not be two classifiers named 'A'' +--- */ + +class A +{ +} + +type A wraps java.lang.String \ No newline at end of file diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore_test new file mode 100644 index 000000000..648f559b5 --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentContainer.xcore_test @@ -0,0 +1,22 @@ +package consistentContainer + +/* XPECT validationIssues --- +error at 'contains A a oppos it e b' message 'A containment reference of a type with a container feature consistentContainer.A.c that requires instances to be contained elsewhere cannot be populated' +error at 'contains A a opposite c' message 'A containment reference of a type with a container feature consistentContainer.A.b that requires instances to be contained elsewhere cannot be populated' +--- */ + +class A +{ + container B [1] b opposite a + container C [1] c opposite a +} + +class B +{ + contains A a opposite b +} + +class C +{ + contains A a opposite c +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore_test new file mode 100644 index 000000000..87a83059d --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBadTransient.xcore_test @@ -0,0 +1,11 @@ +package consistentOppositeBadTransient + +/* XPECT validationIssues --- +error at 'y' message 'The opposite of a transient reference must be transient if it is proxy resolving' +--- */ + +class A +{ + refers transient A x opposite y + refers A y opposite x +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore_test new file mode 100644 index 000000000..f455a540d --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeBothContainment.xcore_test @@ -0,0 +1,12 @@ +package consistentOppositeBothContainment + +/* XPECT validationIssues --- +error at ' y' message 'The opposite of a containment reference must not be a containment reference' +error at ' x' message 'The opposite of a containment reference must not be a containment reference' +--- */ + +class A +{ + contains A x opposite y + contains A y opposite x +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore_test new file mode 100644 index 000000000..c6f1de99b --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-ConsistentOppositeNotMatching.xcore_test @@ -0,0 +1,11 @@ +package consistentOppositeNotMatching + +/* XPECT validationIssues --- +error at ' y' message 'The opposite of the opposite may not be a reference different from this one' +--- */ + +class A +{ + refers A x opposite y + refers A y +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore_test new file mode 100644 index 000000000..154e8b07a --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/EReference-SingleContainer.xcore_test @@ -0,0 +1,11 @@ +package singleContainer + +/* XPECT validationIssues --- +error at ' [*]' message 'A container reference must have upper bound of 1 not -1' +--- */ + +class A +{ + contains A x opposite y + container A [*] y opposite x +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore_test new file mode 100644 index 000000000..cbe0a9d9e --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/ETypedElement-ConsistentBounds.xcore_test @@ -0,0 +1,10 @@ +package consistentBounds + +/* XPECT validationIssues --- +error at '[2..1]' message 'The lower bound 2 must be less than or equal to the upper bound 1' +--- */ + +class A +{ + String [2..1] a +} diff --git a/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore_test b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore_test new file mode 100644 index 000000000..2bb2f3dbf --- /dev/null +++ b/tests/org.eclipse.emf.test.ecore.xcore/test-models/org/eclipse/emf/test/ecore/xcore/validation/Linking.xcore_test @@ -0,0 +1,8 @@ +package linking + +/* XPECT validationIssues --- +error at 'baz' message 'Couldn't resolve reference to GenBase 'baz'.' +error at 'baz' message 'A generic super type must refer to a class' +--- */ + +class bar extends baz {} \ No newline at end of file -- cgit v1.2.3