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 Class_Reference, with prefix
20
* Bug#50711 : Wrong completion kind in a new expression
23
public class CompletionTest_NewTypeReference_Prefix extends CompletionProposalsBaseTest{
25
private final String fileName = "CompletionTestStart28.cpp";
26
private final String fileFullPath ="resources/contentassist/" + fileName;
27
private final String headerFileName = "CompletionTestStart.h";
28
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
29
private final String expectedPrefix = "a";
30
private final String[] expectedResults = {
39
public CompletionTest_NewTypeReference_Prefix(String name) {
43
public static Test suite() {
44
TestSuite suite= new TestSuite(CompletionTest_NewTypeReference_Prefix.class.getName());
45
suite.addTest(new CompletionTest_NewTypeReference_Prefix("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;