~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_VariableType_NoPrefix.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 Variable_type, with NO prefix
20
 
 *
21
 
 */
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 = {
29
 
                        "aClass",
30
 
                        "anotherClass",
31
 
                        "aNamespace",
32
 
                        "anEnumeration",
33
 
                        "AStruct",
34
 
                        "xOtherClass",
35
 
                        "xNamespace",
36
 
                        "xEnumeration",
37
 
                        "XStruct",
38
 
        };
39
 
        
40
 
        public CompletionTest_VariableType_NoPrefix(String name) {
41
 
                super(name);
42
 
                // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
43
 
        }
44
 
        
45
 
        public static Test suite() {
46
 
                TestSuite suite= new TestSuite(CompletionTest_VariableType_NoPrefix.class.getName());
47
 
                suite.addTest(new CompletionTest_VariableType_NoPrefix("testCompletionProposals"));
48
 
                return suite;
49
 
        }               
50
 
        /* (non-Javadoc)
51
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
52
 
         */
53
 
        protected int getCompletionPosition() {
54
 
                return getBuffer().indexOf("     ") + 2;
55
 
        }
56
 
 
57
 
        /* (non-Javadoc)
58
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
59
 
         */
60
 
        protected String getExpectedPrefix() {
61
 
                return expectedPrefix;
62
 
        }
63
 
 
64
 
        /* (non-Javadoc)
65
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
66
 
         */
67
 
        protected String[] getExpectedResultsValues() {
68
 
                return expectedResults;
69
 
        }
70
 
 
71
 
        /* (non-Javadoc)
72
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
73
 
         */
74
 
        protected String getFileName() {
75
 
                return fileName;
76
 
        }
77
 
 
78
 
        /* (non-Javadoc)
79
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
80
 
         */
81
 
        protected String getFileFullPath() {
82
 
                return fileFullPath;
83
 
        }
84
 
        /* (non-Javadoc)
85
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
86
 
         */
87
 
        protected String getHeaderFileFullPath() {
88
 
                return headerFileFullPath;
89
 
        }
90
 
 
91
 
        /* (non-Javadoc)
92
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
93
 
         */
94
 
        protected String getHeaderFileName() {
95
 
                return headerFileName;
96
 
        }
97
 
 
98
 
}