~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_NoPrefix2.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
7
 
 *
8
 
 * Contributors:
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;
15
 
 
16
 
/**
17
 
 * @author hamer
18
 
 * 
19
 
 * Testing Class scope, declaration start, with NO prefix
20
 
 * Bug#50344 :Wrong completion in Class scope if before the first declaration
21
 
 *
22
 
 */
23
 
public class CompletionTest_FieldType_NoPrefix2  extends CompletionProposalsBaseTest{
24
 
        
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 = {
31
 
                        "AStruct",
32
 
                        "XStruct",
33
 
                        "aClass",
34
 
                        "aNamespace",
35
 
                        "aThirdClass",
36
 
                        "anEnumeration",
37
 
                        "anotherClass",
38
 
                        "xEnumeration",
39
 
                        "xNamespace",
40
 
                        "xOtherClass"
41
 
        };
42
 
        
43
 
        public CompletionTest_FieldType_NoPrefix2(String name) {
44
 
                super(name);
45
 
                // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
46
 
        }
47
 
 
48
 
        public static Test suite() {
49
 
                TestSuite suite= new TestSuite(CompletionTest_FieldType_NoPrefix2.class.getName());
50
 
                suite.addTest(new CompletionTest_FieldType_NoPrefix2("testCompletionProposals"));
51
 
                return suite;
52
 
        }               
53
 
        
54
 
        /* (non-Javadoc)
55
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
56
 
         */
57
 
        protected int getCompletionPosition() {
58
 
                return getBuffer().indexOf("      ") + 3;
59
 
        }
60
 
 
61
 
        /* (non-Javadoc)
62
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
63
 
         */
64
 
        protected String getExpectedPrefix() {
65
 
                return expectedPrefix;
66
 
        }
67
 
 
68
 
        /* (non-Javadoc)
69
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
70
 
         */
71
 
        protected String[] getExpectedResultsValues() {
72
 
                return expectedResults;
73
 
        }
74
 
 
75
 
        /* (non-Javadoc)
76
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
77
 
         */
78
 
        protected String getFileName() {
79
 
                return fileName;
80
 
        }
81
 
 
82
 
        /* (non-Javadoc)
83
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
84
 
         */
85
 
        protected String getFileFullPath() {
86
 
                return fileFullPath;
87
 
        }
88
 
        /* (non-Javadoc)
89
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
90
 
         */
91
 
        protected String getHeaderFileFullPath() {
92
 
                return headerFileFullPath;
93
 
        }
94
 
 
95
 
        /* (non-Javadoc)
96
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
97
 
         */
98
 
        protected String getHeaderFileName() {
99
 
                return headerFileName;
100
 
        }
101
 
 
102
 
}