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
* Bryan Wilkinson (QNX)
11
*******************************************************************************/
12
package org.eclipse.cdt.ui.tests.text.contentassist2;
13
import junit.framework.Test;
14
import junit.framework.TestSuite;
19
* Testing Variable_type, with NO prefix
22
public class CompletionTest_VariableType_NoPrefix extends CompletionProposalsBaseTest{
23
private final String fileName = "CompletionTestStart11.cpp";
24
private final String fileFullPath ="resources/contentassist/" + fileName;
25
private final String headerFileName = "CompletionTestStart.h";
26
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
27
private final String expectedPrefix = "";
28
private final String[] expectedResults = {
40
public CompletionTest_VariableType_NoPrefix(String name) {
42
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
45
public static Test suite() {
46
TestSuite suite= new TestSuite(CompletionTest_VariableType_NoPrefix.class.getName());
47
suite.addTest(new CompletionTest_VariableType_NoPrefix("testCompletionProposals"));
51
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
53
protected int getCompletionPosition() {
54
return getBuffer().indexOf(" ") + 2;
58
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
60
protected String getExpectedPrefix() {
61
return expectedPrefix;
65
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
67
protected String[] getExpectedResultsValues() {
68
return expectedResults;
72
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
74
protected String getFileName() {
79
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
81
protected String getFileFullPath() {
85
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
87
protected String getHeaderFileFullPath() {
88
return headerFileFullPath;
92
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
94
protected String getHeaderFileName() {
95
return headerFileName;