Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivian Kong2010-06-02 15:35:43 -0400
committerVivian Kong2010-06-02 15:35:43 -0400
commit0890f7c49e85b0981cb2621e0cb9e1539e47cb0d (patch)
tree4051afa4b0d69dfcd19c85bf8f6cfff82f93b342 /xlc/org.eclipse.cdt.core.lrparser.xlc.tests
parentc2d90006b59e68f91df9edca1c01ff3dac3266bc (diff)
downloadorg.eclipse.cdt-0890f7c49e85b0981cb2621e0cb9e1539e47cb0d.tar.gz
org.eclipse.cdt-0890f7c49e85b0981cb2621e0cb9e1539e47cb0d.tar.xz
org.eclipse.cdt-0890f7c49e85b0981cb2621e0cb9e1539e47cb0d.zip
Bug 315435 Fix the regression test failures in cdt70
Diffstat (limited to 'xlc/org.eclipse.cdt.core.lrparser.xlc.tests')
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/XlcExtensionsTest.java22
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/base/XlcLRCPPTests.java9
2 files changed, 8 insertions, 23 deletions
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/XlcExtensionsTest.java b/xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/XlcExtensionsTest.java
index 940abd59aa..7baa2c44c6 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/XlcExtensionsTest.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/XlcExtensionsTest.java
@@ -275,28 +275,6 @@ public class XlcExtensionsTest extends XlcTestBase {
parse(code, getCPPLanguage(), true); // xlc supports this in C++
}
- public void testStaticAssertions() {
- String code =
- " const unsigned int EIGHT= 8; \n"+
- " __static_assert(sizeof(long) >= EIGHT, \"no 64-bit support\"); \n" +
-
- " namespace ns { \n"+
- " __static_assert(sizeof(long) >= 4, \"no 32-bit support\"); \n" +
- " } \n" +
-
- " template <typename T> class basic_string { \n" +
- " __static_assert(T::value, \"bla\"); \n" +
- " }; \n" +
-
- " void do_something() { \n" +
- " struct VMPage { \n" +
- " }; \n" +
- " __static_assert(sizeof(VMPage) == 1, \"bla\"); \n" +
- " }";
-
- parse(code, getCPPLanguage(), true); // xlc supports this in C++
- }
-
public void testV11Attributes() {
String code =
"#define __inline__ __inline__ __attribute__((gnu_inline)) \n" +
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/base/XlcLRCPPTests.java b/xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/base/XlcLRCPPTests.java
index 46a39b5d9c..b93b2839b2 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/base/XlcLRCPPTests.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc.tests/src/org/eclipse/cdt/core/parser/xlc/tests/base/XlcLRCPPTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,11 +16,18 @@ import org.eclipse.cdt.core.lrparser.tests.LRCPPTests;
import org.eclipse.cdt.core.lrparser.xlc.XlcCLanguage;
import org.eclipse.cdt.core.lrparser.xlc.XlcCPPLanguage;
import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.parser.ParserLanguage;
public class XlcLRCPPTests extends LRCPPTests {
public static TestSuite suite() {
return suite(XlcLRCPPTests.class);
}
+ //CDT_70_FIX_FROM_50-#9
+ public void testStaticAssertions_294730() throws Exception {
+ String code= getAboveComment();
+ code = code.replaceAll("static_assert", "__static_assert");
+ parseAndCheckBindings(code, ParserLanguage.CPP);
+ }
protected ILanguage getCLanguage() {
return XlcCLanguage.getDefault();

Back to the top