1
/*******************************************************************************
2
* Copyright (c) 2006, 2010 IBM Corporation and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* IBM Corporation - initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.core.lrparser.tests;
13
import junit.framework.TestSuite;
15
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
16
import org.eclipse.cdt.core.dom.lrparser.gnu.GCCLanguage;
17
import org.eclipse.cdt.core.dom.lrparser.gnu.GPPLanguage;
18
import org.eclipse.cdt.core.model.ILanguage;
19
import org.eclipse.cdt.core.parser.ParserLanguage;
20
import org.eclipse.cdt.core.parser.tests.ast2.AST2CPPTests;
21
import org.eclipse.cdt.internal.core.parser.ParserException;
23
@SuppressWarnings("restriction")
24
public class LRCPPTests extends AST2CPPTests {
27
public static TestSuite suite() {
28
return suite(LRCPPTests.class);
35
public LRCPPTests(String name) {
39
//the below test case are for C++0x features which are not included in XLC++ yet
43
public void testRValueReference_294730() throws Exception {}
45
public void testRValueReferenceTypedefs_294730() throws Exception {}
47
public void testDirectBinding_294730() throws Exception {}
49
public void testListInitialization_302412a() throws Exception {}
51
public void testListInitialization_302412b() throws Exception {}
53
public void testListInitialization_302412c() throws Exception {}
55
public void testListInitialization_302412d() throws Exception {}
57
public void testListInitialization_302412e() throws Exception {}
59
public void testListInitialization_302412f() throws Exception {}
61
public void testScopedEnums_305975a() throws Exception {}
63
public void testScopedEnums_305975b() throws Exception {}
65
public void testScopedEnums_305975c() throws Exception {}
67
public void testScopedEnums_305975d() throws Exception {}
69
public void testScopedEnums_305975e() throws Exception {}
71
public void testScopedEnums_305975g() throws Exception {}
73
public void testBug332114b() throws Exception {}
76
//unicode character type
78
public void testNewCharacterTypes_305976() throws Exception {}
82
public void testAutoType_289542() throws Exception {}
84
public void testAutoType_305970() throws Exception {}
86
public void testAutoType_305987() throws Exception {}
88
public void testNewFunctionDeclaratorSyntax_305972() throws Exception {}
90
public void testBug332114a() throws Exception {}
92
public void testResolutionInTrailingReturnType_333256() throws Exception {}
94
public void testAutoTypeInRangeBasedFor_332883a() throws Exception {}
96
public void testAutoTypeInRangeBasedFor_332883b() throws Exception {}
101
public void testDeclType_294730() throws Exception {}
103
//Defaulted and deleted functions
105
public void testDefaultedAndDeletedFunctions_305978() throws Exception {}
107
public void testDefaultedAndDeletedFunctions_305978b() throws Exception {}
111
public void testInlineNamespace_305980a() throws Exception {}
113
public void testInlineNamespace_305980b() throws Exception {}
115
public void testInlineNamespace_305980c() throws Exception {}
117
public void testInlineNamespace_305980d() throws Exception {}
119
//New wording for C++0x lambdas
121
public void testLambdaExpression_316307a() throws Exception {}
123
public void testLambdaExpression_316307b() throws Exception {}
127
public void testXValueCategories() throws Exception {}
129
public void testRankingOfReferenceBindings() throws Exception {}
131
public void testInlineNamespaceLookup_324096() throws Exception {}
133
public void testCtorForAutomaticVariables_156668() throws Exception {}
135
public void testRangeBasedForLoop_327223() throws Exception {}
137
//TODO ??? overwrite some failed test cases
139
public void testOrderOfAmbiguityResolution_259373() throws Exception {}
141
public void testPureVirtualVsInitDeclarator_267184() throws Exception {}
143
public void testDeclarationAmbiguity_Bug269953() throws Exception {}
145
public void testInitSyntax_302412() throws Exception {}
147
public void testStaticAssertions_294730() throws Exception {}
152
protected IASTTranslationUnit parse( String code, ParserLanguage lang, @SuppressWarnings("unused") boolean useGNUExtensions, boolean expectNoProblems, boolean skipTrivialInitializers) throws ParserException {
153
ILanguage language = lang.isCPP() ? getCPPLanguage() : getCLanguage();
154
ParseHelper.Options options = new ParseHelper.Options();
155
options.setCheckSyntaxProblems(expectNoProblems);
156
options.setCheckPreprocessorProblems(expectNoProblems);
157
options.setSkipTrivialInitializers(skipTrivialInitializers);
158
return ParseHelper.parse(code, language, options);
161
protected ILanguage getCLanguage() {
162
return GCCLanguage.getDefault();
165
protected ILanguage getCPPLanguage() {
166
return GPPLanguage.getDefault();
171
public void testBug98704() throws Exception {
172
// this one gets stuck in infinite loop
177
// public void testBug87424() throws Exception { // gcc extension
179
// super.testBug87424();
181
// } catch(AssertionFailedError _) {
187
// public void testBug95757() throws Exception { // gcc extension
189
// super.testBug95757();
191
// } catch(AssertionFailedError _) {
196
// public void testBug108202() throws Exception { // gcc attributes not supported
198
// super.testBug108202();
200
// } catch(AssertionFailedError _) {
206
// public void testBug195701() throws Exception { // gcc attributes not supported
208
// super.testBug195701();
210
// } catch(AssertionFailedError _) {
215
// public void testBug179712() throws Exception { // gcc attributes not supported
217
// super.testBug179712();
219
// } catch(AssertionFailedError _) {
224
// public void testBug240567() throws Exception { // gcc
226
// super.testBug240567();
228
// } catch(AssertionFailedError _) {
233
// public void testLiteralsViaOverloads_225534() throws Exception { // gcc, I think
235
// super.testLiteralsViaOverloads_225534();
237
// } catch(AssertionFailedError _) {
243
public void testNestedTemplateIDAmbiguity_259501() throws Exception {
244
// this test hangs, not sure I'll ever fix it