1
/*******************************************************************************
2
* Copyright (c) 2004, 2007 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 Rational Software - Initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.ui.tests.text.contentassist2;
13
import junit.framework.Test;
14
import junit.framework.TestSuite;
19
* Testing Argument_Type completion kind , with a prefix
20
* Bug#50642 : Wrong completion kind when declaring an argument type
23
public class CompletionTest_ArgumentType_Prefix2 extends CompletionProposalsBaseTest{
24
private final String fileName = "CompletionTestStart18.cpp";
25
private final String fileFullPath ="resources/contentassist/" + fileName;
26
private final String headerFileName = "CompletionTestStart.h";
27
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
28
private final String expectedPrefix = "a";
29
private final String[] expectedResults = {
38
public CompletionTest_ArgumentType_Prefix2(String name) {
40
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
41
// setExpectFailure(109724);
44
public static Test suite() {
45
TestSuite suite= new TestSuite(CompletionTest_ArgumentType_Prefix2.class.getName());
46
suite.addTest(new CompletionTest_ArgumentType_Prefix2("testCompletionProposals"));
50
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
52
protected int getCompletionPosition() {
53
return getBuffer().indexOf(" a ") + 2;
57
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
59
protected String getExpectedPrefix() {
60
return expectedPrefix;
64
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
66
protected String[] getExpectedResultsValues() {
67
return expectedResults;
71
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
73
protected String getFileName() {
78
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
80
protected String getFileFullPath() {
84
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
86
protected String getHeaderFileFullPath() {
87
return headerFileFullPath;
91
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
93
protected String getHeaderFileName() {
94
return headerFileName;