Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 89b16bc5bb962b5d6e08531190887caceb2cb4ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
/*******************************************************************************
 *  Copyright (c) 2006, 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
 *  http://www.eclipse.org/legal/epl-v10.html
 * 
 *  Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.cdt.core.lrparser.tests;

import junit.framework.TestSuite;

import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.lrparser.gnu.GCCLanguage;
import org.eclipse.cdt.core.dom.lrparser.gnu.GPPLanguage;
import org.eclipse.cdt.core.model.ILanguage;
import org.eclipse.cdt.core.parser.ParserLanguage;
import org.eclipse.cdt.core.parser.tests.ast2.AST2CPPTests;
import org.eclipse.cdt.internal.core.parser.ParserException;

@SuppressWarnings("restriction")
public class LRCPPTests extends AST2CPPTests {

	
	public static TestSuite suite() {
    	return suite(LRCPPTests.class);
    }
    
	public LRCPPTests() {
		
	}
	
	public LRCPPTests(String name) {
		super(name);
	}
	
//the below test case are for C++0x features which are not included in XLC++ yet
	
	
	@Override
	public void testRValueReference_294730() throws Exception {}
	@Override
	public void testRValueReferenceTypedefs_294730() throws Exception {}
	@Override
	public void testDirectBinding_294730() throws Exception {}
	@Override
	public void testListInitialization_302412a() throws Exception {}
	@Override
	public void testListInitialization_302412b() throws Exception {}
	@Override
	public void testListInitialization_302412c() throws Exception {}
	@Override
	public void testListInitialization_302412d() throws Exception {}
	@Override
	public void testListInitialization_302412e() throws Exception {}
	@Override
	public void testListInitialization_302412f() throws Exception {}
	@Override
	public void testScopedEnums_305975a() throws Exception {}
	@Override
	public void testScopedEnums_305975b() throws Exception {}
	@Override
	public void testScopedEnums_305975c() throws Exception {}
	@Override
	public void testScopedEnums_305975d() throws Exception {}
	@Override
	public void testScopedEnums_305975e() throws Exception {}
	@Override
	public void testScopedEnums_305975g() throws Exception {}
	@Override
	public void testBug332114b() throws Exception {}

	
	//unicode character type
	@Override
	public void testNewCharacterTypes_305976() throws Exception {}
	
	//auto type
	@Override
	public void testAutoType_289542() throws Exception {}
	@Override
	public void testAutoType_305970() throws Exception {}
	@Override
	public void testAutoType_305987() throws Exception {}
	@Override
	public void testNewFunctionDeclaratorSyntax_305972() throws Exception {}
	@Override
	public void testBug332114a() throws Exception {}
	@Override
	public void testResolutionInTrailingReturnType_333256() throws Exception {}
	
	//DeclType
	@Override
	public void testDeclType_294730() throws Exception {}
	
	//Defaulted and deleted functions 
	@Override
	public void testDefaultedAndDeletedFunctions_305978() throws Exception {}
	@Override
	public void testDefaultedAndDeletedFunctions_305978b() throws Exception {}
	
	//Inline namespaces
	@Override
	public void testInlineNamespace_305980a() throws Exception {}
	@Override
	public void testInlineNamespace_305980b() throws Exception {}
	@Override
	public void testInlineNamespace_305980c() throws Exception {}
	@Override
	public void testInlineNamespace_305980d() throws Exception {}
	
	//New wording for C++0x lambdas 
	@Override
	public void testLambdaExpression_316307a() throws Exception {}
	@Override
	public void testLambdaExpression_316307b() throws Exception {}
	
	//xvalue
	@Override
	public void testXValueCategories() throws Exception {}
	@Override
	public void testRankingOfReferenceBindings() throws Exception {}
	@Override
	public void testInlineNamespaceLookup_324096() throws Exception {}
	@Override
	public void testCtorForAutomaticVariables_156668() throws Exception {}
	@Override
	public void testRangeBasedForLoop_327223() throws Exception {}
	
	//TODO ??? overwrite some failed test cases
	@Override
	public void testOrderOfAmbiguityResolution_259373() throws Exception {}
	@Override
	public void testPureVirtualVsInitDeclarator_267184() throws Exception {}
	@Override
	public void testDeclarationAmbiguity_Bug269953() throws Exception {}
	@Override
	public void testInitSyntax_302412() throws Exception {}
	@Override
	public void testStaticAssertions_294730() throws Exception {}
	
	
	 
	@Override
	protected IASTTranslationUnit parse( String code, ParserLanguage lang, @SuppressWarnings("unused") boolean useGNUExtensions, boolean expectNoProblems, boolean skipTrivialInitializers) throws ParserException {
    	ILanguage language = lang.isCPP() ? getCPPLanguage() : getCLanguage();
    	ParseHelper.Options options = new ParseHelper.Options();
    	options.setCheckSyntaxProblems(expectNoProblems);
    	options.setCheckPreprocessorProblems(expectNoProblems);
    	options.setSkipTrivialInitializers(skipTrivialInitializers);
    	return ParseHelper.parse(code, language, options);
    }
    
    protected ILanguage getCLanguage() {
    	return GCCLanguage.getDefault();
    }
    
    protected ILanguage getCPPLanguage() {
    	return GPPLanguage.getDefault();
    }
    
    
    @Override
	public void testBug98704() throws Exception {
    	// this one gets stuck in infinite loop
    	
    }
	
//    @Override
//	public void testBug87424() throws Exception { // gcc extension
//    	try {
//    		super.testBug87424();
//    		fail();
//    	} catch(AssertionFailedError _) {
//    	} 
//    }
//
//    
//    @Override
//	public void testBug95757() throws Exception { // gcc extension
//    	try {
//    		super.testBug95757();
//    		fail();
//    	} catch(AssertionFailedError _) {
//    	} 
//    }
//    
//    @Override
//	public void testBug108202() throws Exception { // gcc attributes not supported
//    	try {
//    		super.testBug108202();
//    		fail();
//    	} catch(AssertionFailedError _) {
//    	} 
//    }
//    
//    
//    @Override
//	public void testBug195701() throws Exception { // gcc attributes not supported
//    	try {
//    		super.testBug195701();
//    		fail();
//    	} catch(AssertionFailedError _) {
//    	} 
//    }
//    
//    @Override
//	public void testBug179712() throws Exception { // gcc attributes not supported
//    	try {
//    		super.testBug179712();
//    		fail();
//    	} catch(AssertionFailedError _) {
//    	} 
//    }
//    
//    @Override
//    public void testBug240567() throws Exception { // gcc
//    	try {
//    		super.testBug240567();
//    		fail();
//    	} catch(AssertionFailedError _) {
//    	} 
//    }
//    
//    @Override
//    public void testLiteralsViaOverloads_225534() throws Exception { // gcc, I think
//    	try {
//    		super.testLiteralsViaOverloads_225534();
//    		fail();
//    	} catch(AssertionFailedError _) {
//    	} 
//    }
    
    
    @Override
	public void testNestedTemplateIDAmbiguity_259501() throws Exception {
    	// this test hangs, not sure I'll ever fix it
    }
    
    
}

Back to the top