1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fixed compiler warning.

This commit is contained in:
Sergey Prigogin 2010-05-02 21:45:28 +00:00
parent e85fb0b135
commit 4a4d247e2f
2 changed files with 5 additions and 10 deletions

View file

@ -35,7 +35,7 @@ import org.eclipse.cdt.internal.ui.text.FastCPartitionScanner;
* Derived from JDT. * Derived from JDT.
*/ */
public class CHeuristicScannerTest extends TestCase { public class CHeuristicScannerTest extends TestCase {
private static boolean BUG_65463_IS_FIXED = false;
private FastPartitioner fPartitioner; private FastPartitioner fPartitioner;
private Document fDocument; private Document fDocument;
private CIndenter fScanner; private CIndenter fScanner;
@ -815,7 +815,7 @@ public class CHeuristicScannerTest extends TestCase {
} }
public void testConditional1() throws Exception { public void testConditional1() throws Exception {
if (true) // XXX enable when https://bugs.eclipse.org/bugs/show_bug.cgi?id=65463 is fixed if (!BUG_65463_IS_FIXED) // Enable when http://bugs.eclipse.org/bugs/show_bug.cgi?id=65463 is fixed
return; return;
fDocument.set( fDocument.set(
" boolean isPrime() {\n" + " boolean isPrime() {\n" +
@ -828,7 +828,7 @@ public class CHeuristicScannerTest extends TestCase {
} }
public void testConditional2() throws Exception { public void testConditional2() throws Exception {
if (true) // XXX enable when https://bugs.eclipse.org/bugs/show_bug.cgi?id=65463 is fixed if (!BUG_65463_IS_FIXED) // Enable when http://bugs.eclipse.org/bugs/show_bug.cgi?id=65463 is fixed
return; return;
fDocument.set( fDocument.set(
" boolean isPrime() {\n" + " boolean isPrime() {\n" +

View file

@ -32,7 +32,7 @@ import org.eclipse.jface.text.rules.IToken;
* Compares two <code>IParitionTokenScanner</code>s for conformance and performance. * Compares two <code>IParitionTokenScanner</code>s for conformance and performance.
*/ */
public class PartitionTokenScannerTest extends TestCase { public class PartitionTokenScannerTest extends TestCase {
static boolean PRINT_TIMING = false;
private IPartitionTokenScanner fReference; private IPartitionTokenScanner fReference;
private IPartitionTokenScanner fTestee; private IPartitionTokenScanner fTestee;
@ -58,9 +58,7 @@ public class PartitionTokenScannerTest extends TestCase {
buffer.append(lineDelimiter); buffer.append(lineDelimiter);
line= reader.readLine(); line= reader.readLine();
} }
return new Document(buffer.toString()); return new Document(buffer.toString());
} catch (IOException e) { } catch (IOException e) {
} }
@ -122,7 +120,7 @@ public class PartitionTokenScannerTest extends TestCase {
final long referenceTime= getTime(fReference, document, COUNT); final long referenceTime= getTime(fReference, document, COUNT);
final long testeeTime= getTime(fTestee, document, COUNT); final long testeeTime= getTime(fTestee, document, COUNT);
if (false) { if (PRINT_TIMING) {
System.out.println("reference time = " + referenceTime / 1000.0f); System.out.println("reference time = " + referenceTime / 1000.0f);
System.out.println("testee time = " + testeeTime / 1000.0f); System.out.println("testee time = " + testeeTime / 1000.0f);
System.out.println("factor = " + (float) referenceTime / testeeTime); System.out.println("factor = " + (float) referenceTime / testeeTime);
@ -144,7 +142,6 @@ public class PartitionTokenScannerTest extends TestCase {
} }
private void testConformance(final IDocument document) { private void testConformance(final IDocument document) {
final StringBuffer message= new StringBuffer(); final StringBuffer message= new StringBuffer();
fReference.setRange(document, 0, document.getLength()); fReference.setRange(document, 0, document.getLength());
@ -185,7 +182,6 @@ public class PartitionTokenScannerTest extends TestCase {
} }
private static void testPerformance(final IPartitionTokenScanner scanner, final IDocument document) { private static void testPerformance(final IPartitionTokenScanner scanner, final IDocument document) {
scanner.setRange(document, 0, document.getLength()); scanner.setRange(document, 0, document.getLength());
IToken token; IToken token;
@ -259,5 +255,4 @@ public class PartitionTokenScannerTest extends TestCase {
return buffer.toString(); return buffer.toString();
} }
} }