~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_TypeRef_Prefix.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
 
 
14
 
import junit.framework.Test;
15
 
import junit.framework.TestSuite;
16
 
 
17
 
/**
18
 
 * @author hamer
19
 
 * 
20
 
 * Testing Type_Reference, with prefix
21
 
 * Bug#50471 : Wrong completion kind after the "using" keyword
22
 
 *
23
 
 */
24
 
public class CompletionTest_TypeRef_Prefix  extends CompletionProposalsBaseTest{
25
 
        
26
 
        private final String fileName = "CompletionTestStart25.cpp";
27
 
        private final String fileFullPath ="resources/contentassist/" + fileName;
28
 
        private final String headerFileName = "CompletionTestStart.h";
29
 
        private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
30
 
        private final String expectedPrefix = "a"; 
31
 
        private final String[] expectedResults = {
32
 
                        "aNamespace"
33
 
        };
34
 
        
35
 
        public CompletionTest_TypeRef_Prefix(String name) {
36
 
                super(name);
37
 
                // https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
38
 
        }
39
 
 
40
 
        public static Test suite() {
41
 
                TestSuite suite= new TestSuite(CompletionTest_TypeRef_Prefix.class.getName());
42
 
                suite.addTest(new CompletionTest_TypeRef_Prefix("testCompletionProposals"));
43
 
                return suite;
44
 
        }               
45
 
        
46
 
        /* (non-Javadoc)
47
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
48
 
         */
49
 
        protected int getCompletionPosition() {
50
 
                return getBuffer().indexOf("using a ") + 7;
51
 
        }
52
 
 
53
 
        /* (non-Javadoc)
54
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
55
 
         */
56
 
        protected String getExpectedPrefix() {
57
 
                return expectedPrefix;
58
 
        }
59
 
 
60
 
        /* (non-Javadoc)
61
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
62
 
         */
63
 
        protected String[] getExpectedResultsValues() {
64
 
                return expectedResults;
65
 
        }
66
 
 
67
 
        /* (non-Javadoc)
68
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
69
 
         */
70
 
        protected String getFileName() {
71
 
                return fileName;
72
 
        }
73
 
 
74
 
        /* (non-Javadoc)
75
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
76
 
         */
77
 
        protected String getFileFullPath() {
78
 
                return fileFullPath;
79
 
        }
80
 
        /* (non-Javadoc)
81
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
82
 
         */
83
 
        protected String getHeaderFileFullPath() {
84
 
                return headerFileFullPath;
85
 
        }
86
 
 
87
 
        /* (non-Javadoc)
88
 
         * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
89
 
         */
90
 
        protected String getHeaderFileName() {
91
 
                return headerFileName;
92
 
        }
93
 
 
94
 
}