Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2007-12-12 06:38:04 -0500
committerAnton Leherbauer2007-12-12 06:38:04 -0500
commit10ed25392435d60dcfbbc7d09276060d426c0e84 (patch)
tree60879b9e0bafa5dfcb4c6c6be180c6a9a6db8f80
parent65709b6e5efc40d2d7a9747a112748bf9eb2bee7 (diff)
downloadorg.eclipse.cdt-10ed25392435d60dcfbbc7d09276060d426c0e84.tar.gz
org.eclipse.cdt-10ed25392435d60dcfbbc7d09276060d426c0e84.tar.xz
org.eclipse.cdt-10ed25392435d60dcfbbc7d09276060d426c0e84.zip
Fix JUnit failures (212552, 212593, 212597)
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/FileBasePluginTest.java16
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2FileBasePluginTest.java10
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMFileBasePluginTest.java16
-rw-r--r--core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/BaseTestFramework.java8
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTests.java14
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java30
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java28
7 files changed, 61 insertions, 61 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/FileBasePluginTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/FileBasePluginTest.java
index 2461866962..f3d6594f57 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/FileBasePluginTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/FileBasePluginTest.java
@@ -92,7 +92,7 @@ public class FileBasePluginTest extends TestCase {
static FileManager fileManager;
static int numProjects = 0;
static Class className;
- static ICProject cPrj;
+ static ICProject cPrj;
public FileBasePluginTest() {
}
@@ -148,14 +148,14 @@ public class FileBasePluginTest extends TestCase {
}
protected void tearDown() throws Exception {
- if( project == null || !project.exists() )
+ if( project == null || !project.exists() )
return;
IResource [] members = project.members();
for( int i = 0; i < members.length; i++ ){
- if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cdtproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+ if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
continue;
- if (members[i].getName().equals(".settings"))
+ if (members[i].getName().equals(".settings"))
continue;
try{
members[i].delete( false, monitor );
@@ -171,15 +171,15 @@ public class FileBasePluginTest extends TestCase {
// if (!file.exists()) {
// try{
// FileInputStream fileIn = new FileInputStream(
-// CTestPlugin.getDefault().getFileInPlugin(new Path("resources/parser/" + fileName)));
-// file.create(fileIn,false, monitor);
+// CTestPlugin.getDefault().getFileInPlugin(new Path("resources/parser/" + fileName)));
+// file.create(fileIn,false, monitor);
// } catch (CoreException e) {
// e.printStackTrace();
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// }
// }
-//
+//
// return file;
// }
@@ -196,7 +196,7 @@ public class FileBasePluginTest extends TestCase {
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2FileBasePluginTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2FileBasePluginTest.java
index d952dcfa73..d6f9967f8a 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2FileBasePluginTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2FileBasePluginTest.java
@@ -46,7 +46,7 @@ public class AST2FileBasePluginTest extends TestCase {
static FileManager fileManager;
static int numProjects = 0;
static Class className;
- static ICProject cPrj;
+ static ICProject cPrj;
public AST2FileBasePluginTest() {
}
@@ -103,14 +103,14 @@ public class AST2FileBasePluginTest extends TestCase {
}
protected void tearDown() throws Exception {
- if( project == null || !project.exists() )
+ if( project == null || !project.exists() )
return;
IResource [] members = project.members();
for( int i = 0; i < members.length; i++ ){
- if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cdtproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+ if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
continue;
- if (members[i].getName().equals(".settings"))
+ if (members[i].getName().equals(".settings"))
continue;
try{
members[i].delete( false, monitor );
@@ -133,7 +133,7 @@ public class AST2FileBasePluginTest extends TestCase {
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMFileBasePluginTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMFileBasePluginTest.java
index eaafc8eccd..b3a79a819d 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMFileBasePluginTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMFileBasePluginTest.java
@@ -43,7 +43,7 @@ public class DOMFileBasePluginTest extends TestCase {
static FileManager fileManager;
static int numProjects = 0;
static Class className;
- static ICProject cPrj;
+ static ICProject cPrj;
public DOMFileBasePluginTest() {
}
@@ -100,14 +100,14 @@ public class DOMFileBasePluginTest extends TestCase {
}
protected void tearDown() throws Exception {
- if( project == null || !project.exists() )
+ if( project == null || !project.exists() )
return;
IResource [] members = project.members();
for( int i = 0; i < members.length; i++ ){
- if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cdtproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+ if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
continue;
- if (members[i].getName().equals(".settings"))
+ if (members[i].getName().equals(".settings"))
continue;
try{
members[i].delete( false, monitor );
@@ -123,15 +123,15 @@ public class DOMFileBasePluginTest extends TestCase {
// if (!file.exists()) {
// try{
// FileInputStream fileIn = new FileInputStream(
-// CTestPlugin.getDefault().getFileInPlugin(new Path("resources/parser/" + fileName)));
-// file.create(fileIn,false, monitor);
+// CTestPlugin.getDefault().getFileInPlugin(new Path("resources/parser/" + fileName)));
+// file.create(fileIn,false, monitor);
// } catch (CoreException e) {
// e.printStackTrace();
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// }
// }
-//
+//
// return file;
// }
@@ -148,7 +148,7 @@ public class DOMFileBasePluginTest extends TestCase {
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
diff --git a/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/BaseTestFramework.java b/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/BaseTestFramework.java
index 850d392a44..aee1feda4c 100644
--- a/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/BaseTestFramework.java
+++ b/core/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/BaseTestFramework.java
@@ -95,14 +95,14 @@ abstract public class BaseTestFramework extends TestCase {
}
protected void tearDown() throws Exception {
- if( project == null || !project.exists() )
+ if( project == null || !project.exists() )
return;
IResource [] members = project.members();
for( int i = 0; i < members.length; i++ ){
- if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cdtproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+ if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
continue;
- if (members[i].getName().equals(".settings"))
+ if (members[i].getName().equals(".settings"))
continue;
try{
members[i].delete( false, monitor );
@@ -115,7 +115,7 @@ abstract public class BaseTestFramework extends TestCase {
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTests.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTests.java
index 7c7a014013..4b975119a8 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTests.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTests.java
@@ -63,7 +63,7 @@ public class ContentAssistTests extends BaseUITestCase {
//(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
if (project == null) {
- ICProject cPrj;
+ ICProject cPrj;
try {
cPrj = CProjectHelper.createCCProject("ContentAssistTestProject", "bin", IPDOMManager.ID_FAST_INDEXER); //$NON-NLS-1$ //$NON-NLS-2$
@@ -119,16 +119,16 @@ public class ContentAssistTests extends BaseUITestCase {
}
protected void tearDown() throws Exception {
- if( project == null || !project.exists() )
+ if( project == null || !project.exists() )
return;
closeAllEditors();
IResource [] members = project.members();
for( int i = 0; i < members.length; i++ ){
- if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cdtproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+ if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
continue;
- if (members[i].getName().equals(".settings"))
+ if (members[i].getName().equals(".settings"))
continue;
try{
members[i].delete( false, monitor );
@@ -136,14 +136,14 @@ public class ContentAssistTests extends BaseUITestCase {
/*boo*/
}
}
- project= null;
+
}
protected IFile importFile(String fileName, String contents ) throws Exception{
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
@@ -226,7 +226,7 @@ public class ContentAssistTests extends BaseUITestCase {
assertEquals( "IDIOT", results[1].getDisplayString() ); //$NON-NLS-1$
assertEquals( "NORMAL", results[2].getDisplayString() ); //$NON-NLS-1$
- // in a method definition context, constructors and methods should be proposed
+ // in a method definition context, constructors and methods should be proposed
c2 = code + "return 0;}\nStrategy::\n"; //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java
index ea52ca30e3..a164b433b4 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java
@@ -138,16 +138,16 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
}
protected void tearDown() throws Exception {
- if( project == null || !project.exists() )
+ if( project == null || !project.exists() )
return;
closeAllEditors();
IResource [] members = project.members();
for( int i = 0; i < members.length; i++ ){
- if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cdtproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+ if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
continue;
- if (members[i].getName().equals(".settings"))
+ if (members[i].getName().equals(".settings"))
continue;
try{
members[i].delete( false, monitor );
@@ -161,7 +161,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
@@ -177,7 +177,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- IPath location = new Path(project.getLocation().removeLastSegments(1).toOSString() + File.separator + fileName);
+ IPath location = new Path(project.getLocation().removeLastSegments(1).toOSString() + File.separator + fileName);
File linkFile = new File(location.toOSString());
if (!linkFile.exists()) {
@@ -186,7 +186,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
file.createLink(location, IResource.ALLOW_MISSING_LOCAL, null);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
@@ -211,7 +211,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
IFile file = linkedFolder.getFile(fileName);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
@@ -347,7 +347,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
assertEquals(((ASTNode)def).getOffset(), 330);
assertEquals(((ASTNode)def).getLength(), 5);
- offset= code.indexOf("MyConst") + 2;
+ offset= code.indexOf("MyConst") + 2;
defOffset= code.indexOf("MyConst", offset) + 2;
def = testF3(file, offset);
decl = testF3(file, defOffset);
@@ -360,7 +360,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
assertEquals(((ASTNode)def).getOffset(), 354);
assertEquals(((ASTNode)def).getLength(), 7);
- offset= code.indexOf("MyFunc") + 2;
+ offset= code.indexOf("MyFunc") + 2;
defOffset= code.indexOf("MyFunc", offset) + 2;
def = testF3(file, offset);
decl = testF3(file, defOffset);
@@ -373,7 +373,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
assertEquals(((ASTNode)def).getOffset(), 373);
assertEquals(((ASTNode)def).getLength(), 6);
- offset= code.indexOf("MyStruct") + 2;
+ offset= code.indexOf("MyStruct") + 2;
defOffset= code.indexOf("MyStruct", offset) + 2;
def = testF3(file, offset);
decl = testF3(file, defOffset);
@@ -386,7 +386,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
assertEquals(((ASTNode)def).getOffset(), 417);
assertEquals(((ASTNode)def).getLength(), 8);
- offset= code.indexOf("MyClass") + 2;
+ offset= code.indexOf("MyClass") + 2;
defOffset= code.indexOf("MyClass", offset) + 2;
def = testF3(file, offset);
decl = testF3(file, defOffset);
@@ -924,7 +924,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
String code = buffer.toString();
IFile file = importFileWithLink("testBug78354.cpp", code); //$NON-NLS-1$
- int offset = code.indexOf("TestTypeOne myFirstLink = 5;"); //$NON-NLS-1$
+ int offset = code.indexOf("TestTypeOne myFirstLink = 5;"); //$NON-NLS-1$
IASTNode decl = testF3(file, offset);
assertTrue(decl instanceof IASTName);
assertEquals(((IASTName)decl).toString(), "TestTypeOne"); //$NON-NLS-1$
@@ -956,7 +956,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
buffer.append("int foo() {\n"); //$NON-NLS-1$
buffer.append(" return x;\n"); //$NON-NLS-1$
buffer.append("}\n"); //$NON-NLS-1$
- String code = buffer.toString();
+ String code = buffer.toString();
IFile file = importFileInsideLinkedFolder("testBug76043.c", code, "folder"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -982,7 +982,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
String[] filenames= {"testBug195822.c", "testBug195822.cpp"};
for (int i=0; i<2; i++) {
- IFile file = importFile(filenames[i], code);
+ IFile file = importFile(filenames[i], code);
int od1 = code.indexOf("functionPointer");
int or1 = code.indexOf("functionPointer", od1+1);
@@ -1001,7 +1001,7 @@ public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
decl = testF3(file, code.length() + or2);
assertTrue(decl instanceof IASTName);
- assertEquals(((IASTName)decl).toString(), "functionPointerArray");
+ assertEquals(((IASTName)decl).toString(), "functionPointerArray");
assertEquals(((ASTNode)decl).getOffset(), code.length() + od2);
}
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java
index 50d07896b7..ee6b7ccf95 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java
@@ -123,16 +123,16 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
}
protected void tearDown() throws Exception {
- if( project == null || !project.exists() )
+ if( project == null || !project.exists() )
return;
closeAllEditors();
IResource [] members = project.members();
for( int i = 0; i < members.length; i++ ){
- if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cdtproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+ if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
continue;
- if (members[i].getName().equals(".settings"))
+ if (members[i].getName().equals(".settings"))
continue;
try{
members[i].delete( true, monitor );
@@ -146,7 +146,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
@@ -162,7 +162,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- IPath location = new Path(project.getLocation().removeLastSegments(1).toOSString() + File.separator + fileName);
+ IPath location = new Path(project.getLocation().removeLastSegments(1).toOSString() + File.separator + fileName);
File linkFile = new File(location.toOSString());
if (!linkFile.exists()) {
@@ -171,7 +171,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
file.createLink(location, IResource.ALLOW_MISSING_LOCAL, null);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
@@ -196,7 +196,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
IFile file = linkedFolder.getFile(fileName);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
@@ -215,7 +215,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
//Obtain file handle
IFile file = project.getProject().getFile(fileName);
- IPath location = new Path(folder.getLocation().toOSString() + File.separator + fileName);
+ IPath location = new Path(folder.getLocation().toOSString() + File.separator + fileName);
File linkFile = new File(location.toOSString());
if (!linkFile.exists()) {
@@ -224,7 +224,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
file.createLink(location, IResource.ALLOW_MISSING_LOCAL, null);
- InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+ InputStream stream = new ByteArrayInputStream( contents.getBytes() );
//Create file input stream
if( file.exists() )
file.setContents( stream, false, false, monitor );
@@ -321,7 +321,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
assertEquals(((ASTNode)def).getOffset(), 330);
assertEquals(((ASTNode)def).getLength(), 5);
- offset= code.indexOf("MyConst") + 2;
+ offset= code.indexOf("MyConst") + 2;
defOffset= code.indexOf("MyConst", offset) + 2;
def = testF3(file, offset);
decl = testF3(file, defOffset);
@@ -334,7 +334,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
assertEquals(((ASTNode)def).getOffset(), 354);
assertEquals(((ASTNode)def).getLength(), 7);
- offset= code.indexOf("MyFunc") + 2;
+ offset= code.indexOf("MyFunc") + 2;
defOffset= code.indexOf("MyFunc", offset) + 2;
def = testF3(file, offset);
decl = testF3(file, defOffset);
@@ -347,7 +347,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
assertEquals(((ASTNode)def).getOffset(), 373);
assertEquals(((ASTNode)def).getLength(), 6);
- offset= code.indexOf("MyStruct") + 2;
+ offset= code.indexOf("MyStruct") + 2;
defOffset= code.indexOf("MyStruct", offset) + 2;
def = testF3(file, offset);
decl = testF3(file, defOffset);
@@ -641,7 +641,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
buffer.append("int foo() {\n"); //$NON-NLS-1$
buffer.append(" return x;\n"); //$NON-NLS-1$
buffer.append("}\n"); //$NON-NLS-1$
- String code = buffer.toString();
+ String code = buffer.toString();
IFile file = importFileInsideLinkedFolder("testBug76043.c", code, "folder"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -669,7 +669,7 @@ public class CSelectionTestsNoIndexer extends BaseUITestCase {
String code = buffer.toString();
IFile file = importFileWithLink("testBug78354.cpp", code); //$NON-NLS-1$
- int offset = code.indexOf("TestTypeOne myFirstLink = 5;"); //$NON-NLS-1$
+ int offset = code.indexOf("TestTypeOne myFirstLink = 5;"); //$NON-NLS-1$
IASTNode decl = testF3(file, offset);
assertTrue(decl instanceof IASTName);
assertEquals(((IASTName)decl).toString(), "TestTypeOne"); //$NON-NLS-1$

Back to the top