aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2008-11-28 09:58:38 (EST)
committersefftinge2008-11-28 09:58:38 (EST)
commitceb5d31760e2acea092ac369ee928c47ed73e319 (patch)
tree888d502a37415653062acd63fdf7c4f01e9326cf
parentfdf0e82344c82988284c8a803517cd90a5870776 (diff)
downloadorg.eclipse.xtext-ceb5d31760e2acea092ac369ee928c47ed73e319.zip
org.eclipse.xtext-ceb5d31760e2acea092ac369ee928c47ed73e319.tar.gz
org.eclipse.xtext-ceb5d31760e2acea092ac369ee928c47ed73e319.tar.bz2
Remove partial linking, fix in partial parsing
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java
index 7740323..d1be1ae 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java
@@ -87,6 +87,25 @@ public class PartialParserTest extends AbstractPartialParserTest {
rootNode = reparse.getRootNode();
checkGrammarAssigned(rootNode);
}
+
+ public void testParseIsPartial() throws Exception {
+ with(ReferenceGrammarStandaloneSetup.class);
+ String model = "spielplatz 1 {kind (k 1)\n}";
+ XtextResource resource = getResourceFromString(model);
+ CompositeNode rootNode = resource.getParseResult().getRootNode();
+ resource.update(model.indexOf("k 1"), 3, "l 2");
+ assertSame(rootNode, resource.getParseResult().getRootNode());
+ }
+
+ public void testParseIsPartialTwice() throws Exception {
+ with(ReferenceGrammarStandaloneSetup.class);
+ String model = "spielplatz 1 {kind (k 1)\n}";
+ XtextResource resource = getResourceFromString(model);
+ CompositeNode rootNode = resource.getParseResult().getRootNode();
+ resource.update(model.indexOf("k 1"), 3, "l 2");
+ resource.update(model.indexOf("k 1"), 3, "m 3");
+ assertSame(rootNode, resource.getParseResult().getRootNode());
+ }
@SuppressWarnings("serial")
private void checkGrammarAssigned(CompositeNode rootNode) {