aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-02-24 12:05:33 (EST)
committersefftinge2009-02-24 12:05:33 (EST)
commit61003db80a765ee034eab6b12c3645802d2ee35c (patch)
tree1bd7212a71fc008d7f8b17be5b2ffd4045931068
parent80d4568050be28c961d7e1ac8b5a9c6c6633c3af (diff)
downloadorg.eclipse.xtext-61003db80a765ee034eab6b12c3645802d2ee35c.zip
org.eclipse.xtext-61003db80a765ee034eab6b12c3645802d2ee35c.tar.gz
org.eclipse.xtext-61003db80a765ee034eab6b12c3645802d2ee35c.tar.bz2
Packrat parsing: Removed workaround
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddensTest.java31
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddensTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddensTest.java
index 1003bbe..6b42a0f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddensTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddensTest.java
@@ -34,7 +34,7 @@ public class HiddensTest extends AbstractGeneratorTest {
private EStructuralFeature inheritingCall;
private EStructuralFeature overridingValid;
private EStructuralFeature inheritingValid;
-
+
@Override
protected void setUp() throws Exception {
with(HiddenTerminalsTestLanguageStandaloneSetup.class);
@@ -54,7 +54,7 @@ public class HiddensTest extends AbstractGeneratorTest {
inheritingCall = inheritingHiddens.getEStructuralFeature("called");
overridingCall = overridingHiddens.getEStructuralFeature("called");
}
-
+
public void testSetup() {
assertNotNull(withoutHiddens);
assertNotNull(withHiddens);
@@ -70,7 +70,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertNotNull(overridingCall);
assertNotNull(inheritingCall);
}
-
+
public void testWithoutHiddens_01() throws Exception {
String model = "without hiddens ;";
Resource res = getResourceFromString(model);
@@ -80,7 +80,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(withoutHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testWithoutHiddens_02() throws Exception {
String model = "without hiddens;";
Resource res = getResourceFromString(model);
@@ -90,7 +90,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(withoutHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testWithHiddens_01() throws Exception {
String model = "with hiddens ;";
Resource res = getResourceFromString(model);
@@ -100,7 +100,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(withHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testWithHiddens_02() throws Exception {
String model = "with/* comment */hiddens;";
Resource res = getResourceFromString(model);
@@ -110,7 +110,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(withHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testOverridingHiddens_01() throws Exception {
String model = "overriding hiddens (call;);";
Resource res = getResourceFromString(model);
@@ -120,7 +120,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(overridingHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testOverridingHiddens_02() throws Exception {
String model = "overriding hiddens ( call ; ) ;";
Resource res = getResourceFromString(model);
@@ -130,7 +130,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(overridingHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testInheritingHiddens_01() throws Exception {
String model = "inheriting hiddens (call;);";
Resource res = getResourceFromString(model);
@@ -140,7 +140,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(inheritingHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testInheritingHiddens_02() throws Exception {
String model = "inheriting hiddens ( call /*comment */ ; ) ;";
Resource res = getResourceFromString(model);
@@ -150,7 +150,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(inheritingHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testInheritingHiddens_03() throws Exception {
String model = "inheriting hiddens ( hiding call; ) ;";
Resource res = getResourceFromString(model);
@@ -160,7 +160,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(inheritingHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testInheritingHiddens_04() throws Exception {
String model = "inheriting hiddens (/*comment*/hiding call;/*comment*/) ;";
Resource res = getResourceFromString(model);
@@ -170,7 +170,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(inheritingHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testDatatypeHiddens_01() throws Exception {
String model = "datatype rule;";
Resource res = getResourceFromString(model);
@@ -180,7 +180,7 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(datatypeHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testDatatypeHiddens_02() throws Exception {
String model = "datatype rule ;";
Resource res = getResourceFromString(model);
@@ -190,10 +190,11 @@ public class HiddensTest extends AbstractGeneratorTest {
assertEquals(datatypeHiddens, root.eClass());
assertTrue((Boolean) root.eGet(valid));
}
-
+
public void testDatatypeHiddens_03() throws Exception {
String model = "datatype rule /* foo */ ;";
Resource res = getResourceFromString(model);
assertFalse(res.getErrors().isEmpty());
+ assertEquals(1, res.getErrors().size());
}
}