aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormeysholdt2009-04-02 09:25:58 (EDT)
committersefftinge2009-04-02 09:25:58 (EDT)
commit23671920a67378cf15b1a12a461c681f0e37519f (patch)
tree37db666f0ef536d3903c13104767cb73e851e14c
parent38e6e74cedbfdea07804354bcfeccaaa0b2eeccb (diff)
downloadorg.eclipse.xtext-23671920a67378cf15b1a12a461c681f0e37519f.zip
org.eclipse.xtext-23671920a67378cf15b1a12a461c681f0e37519f.tar.gz
org.eclipse.xtext-23671920a67378cf15b1a12a461c681f0e37519f.tar.bz2
added test for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=270963
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTest.java
index 138a5f3..615b733 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/InheritanceTest.java
@@ -18,8 +18,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.xtext.AbstractRule;
import org.eclipse.xtext.GrammarUtil;
+import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.TypeRef;
+import org.eclipse.xtext.crossref.ILinkingService;
import org.eclipse.xtext.grammarinheritance.ametamodel.AmetamodelPackage;
+import org.eclipse.xtext.grammarinheritance.services.ConcreteTestLanguageGrammarAccess;
import org.eclipse.xtext.tests.AbstractGeneratorTest;
import com.google.common.base.Function;
@@ -63,4 +66,13 @@ public class InheritanceTest extends AbstractGeneratorTest {
}
assertTrue(expectedNames.toString(), expectedNames.isEmpty());
}
+
+ //see https://bugs.eclipse.org/bugs/show_bug.cgi?id=270963
+ public void _testScoping() {
+ ILinkingService l = getLinkingService();
+ ConcreteTestLanguageGrammarAccess ga = (ConcreteTestLanguageGrammarAccess) getGrammarAccess();
+ RuleCall rc = ga.getAbstractCallOverridenParserRuleAccess().getElementsOverridableParserRuleParserRuleCall_1_0();
+ String ref = l.getLinkText(rc.getRule(), rc.eContainmentFeature(), rc);
+ assertNotNull(ref);
+ }
}