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:
parent
e85fb0b135
commit
4a4d247e2f
2 changed files with 5 additions and 10 deletions
|
@ -35,7 +35,7 @@ import org.eclipse.cdt.internal.ui.text.FastCPartitionScanner;
|
|||
* Derived from JDT.
|
||||
*/
|
||||
public class CHeuristicScannerTest extends TestCase {
|
||||
|
||||
private static boolean BUG_65463_IS_FIXED = false;
|
||||
private FastPartitioner fPartitioner;
|
||||
private Document fDocument;
|
||||
private CIndenter fScanner;
|
||||
|
@ -815,7 +815,7 @@ public class CHeuristicScannerTest extends TestCase {
|
|||
}
|
||||
|
||||
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;
|
||||
fDocument.set(
|
||||
" boolean isPrime() {\n" +
|
||||
|
@ -828,7 +828,7 @@ public class CHeuristicScannerTest extends TestCase {
|
|||
}
|
||||
|
||||
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;
|
||||
fDocument.set(
|
||||
" boolean isPrime() {\n" +
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.jface.text.rules.IToken;
|
|||
* Compares two <code>IParitionTokenScanner</code>s for conformance and performance.
|
||||
*/
|
||||
public class PartitionTokenScannerTest extends TestCase {
|
||||
|
||||
static boolean PRINT_TIMING = false;
|
||||
private IPartitionTokenScanner fReference;
|
||||
private IPartitionTokenScanner fTestee;
|
||||
|
||||
|
@ -58,9 +58,7 @@ public class PartitionTokenScannerTest extends TestCase {
|
|||
buffer.append(lineDelimiter);
|
||||
line= reader.readLine();
|
||||
}
|
||||
|
||||
return new Document(buffer.toString());
|
||||
|
||||
} catch (IOException e) {
|
||||
}
|
||||
|
||||
|
@ -122,7 +120,7 @@ public class PartitionTokenScannerTest extends TestCase {
|
|||
final long referenceTime= getTime(fReference, 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("testee time = " + testeeTime / 1000.0f);
|
||||
System.out.println("factor = " + (float) referenceTime / testeeTime);
|
||||
|
@ -144,7 +142,6 @@ public class PartitionTokenScannerTest extends TestCase {
|
|||
}
|
||||
|
||||
private void testConformance(final IDocument document) {
|
||||
|
||||
final StringBuffer message= new StringBuffer();
|
||||
|
||||
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) {
|
||||
|
||||
scanner.setRange(document, 0, document.getLength());
|
||||
|
||||
IToken token;
|
||||
|
@ -259,5 +255,4 @@ public class PartitionTokenScannerTest extends TestCase {
|
|||
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue