aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2008-12-01 03:38:49 (EST)
committersefftinge2008-12-01 03:38:49 (EST)
commit9d274878d8e73210aa423129dbf64b13628b4163 (patch)
tree933b22202640db9c2ed6d6d6acc00cf0fef09134
parent6d6a3a70e544ca0e818de12691ac40d3fa4659ce (diff)
downloadorg.eclipse.xtext-9d274878d8e73210aa423129dbf64b13628b4163.zip
org.eclipse.xtext-9d274878d8e73210aa423129dbf64b13628b4163.tar.gz
org.eclipse.xtext-9d274878d8e73210aa423129dbf64b13628b4163.tar.bz2
- Default Linker produces error markers for more cases
- PartialLinkingTest reactivated
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/XtextResourceTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/XtextResourceTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/XtextResourceTest.java
index db34192..68ac712 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/XtextResourceTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/XtextResourceTest.java
@@ -9,6 +9,7 @@ package org.eclipse.xtext.resource;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.xtext.crossref.internal.XtextLinkingDiagnostic;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.testlanguages.ReferenceGrammarStandaloneSetup;
import org.eclipse.xtext.tests.AbstractGeneratorTest;
@@ -109,5 +110,14 @@ public class XtextResourceTest extends AbstractGeneratorTest {
assertNotNull(parseResult.getRootASTElement());
}
+ public void testErrorMarkers() throws Exception {
+ String model = "spielplatz 1 {kind(B 1) erwachsener(E 1) familie(F E E B, B)}";
+ resource.update(0, 0, model);
+ assertEquals(1, resource.getErrors().size());
+ XtextLinkingDiagnostic diag = (XtextLinkingDiagnostic) resource.getErrors().get(0);
+ assertEquals(model.indexOf("B)"), diag.getOffset());
+ assertEquals(1, diag.getLength());
+ }
+
}