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 Class scope, declaration start, with NO prefix
20
* Bug#50344 :Wrong completion in Class scope if before the first declaration
23
public class CompletionTest_FieldType_NoPrefix2 extends CompletionProposalsBaseTest{
25
private final String fileName = "CompletionTestStart13.h";
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 = "";
30
private final String[] expectedResults = {
43
public CompletionTest_FieldType_NoPrefix2(String name) {
45
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
48
public static Test suite() {
49
TestSuite suite= new TestSuite(CompletionTest_FieldType_NoPrefix2.class.getName());
50
suite.addTest(new CompletionTest_FieldType_NoPrefix2("testCompletionProposals"));
55
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
57
protected int getCompletionPosition() {
58
return getBuffer().indexOf(" ") + 3;
62
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
64
protected String getExpectedPrefix() {
65
return expectedPrefix;
69
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
71
protected String[] getExpectedResultsValues() {
72
return expectedResults;
76
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
78
protected String getFileName() {
83
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
85
protected String getFileFullPath() {
89
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
91
protected String getHeaderFileFullPath() {
92
return headerFileFullPath;
96
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
98
protected String getHeaderFileName() {
99
return headerFileName;