Skip to content
Browse files

[333836] Scanner test produced different byte codes with new compiler…

… due to unused variables
  • Loading branch information...
1 parent 19f325f commit d1aecfe947e61c7b89911e1bf9f951db9863bd92 nitind committed
View
29 ...e.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ScannerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -267,10 +267,10 @@ public void test013() {
char[] source = "0xaapaf".toCharArray(); //$NON-NLS-1$
scanner.setSource(source);
scanner.resetTo(0, source.length - 1);
- int counter = 0;
+ //int counter = 0;
try {
while (scanner.getNextToken() != ITerminalSymbols.TokenNameEOF) {
- counter++;
+ //counter++;
}
} catch (InvalidInputException e) {
assertTrue(true);
@@ -287,10 +287,10 @@ public void test014() {
char[] source = "0xaap.1f".toCharArray(); //$NON-NLS-1$
scanner.setSource(source);
scanner.resetTo(0, source.length - 1);
- int counter = 0;
+ //int counter = 0;
try {
while (scanner.getNextToken() != ITerminalSymbols.TokenNameEOF) {
- counter++;
+ //counter++;
}
} catch (InvalidInputException e) {
assertTrue(true);
@@ -383,10 +383,10 @@ public void test019() {
char[] source = "0x".toCharArray(); //$NON-NLS-1$
scanner.setSource(source);
scanner.resetTo(0, source.length - 1);
- int counter = 0;
+ //int counter = 0;
try {
while (scanner.getNextToken() != ITerminalSymbols.TokenNameEOF) {
- counter++;
+ //counter++;
}
} catch (InvalidInputException e) {
assertTrue(true);
@@ -403,10 +403,10 @@ public void test020() {
char[] source = "0x".toCharArray(); //$NON-NLS-1$
scanner.setSource(source);
scanner.resetTo(0, source.length - 1);
- int counter = 0;
+ //int counter = 0;
try {
while (scanner.getNextToken() != ITerminalSymbols.TokenNameEOF) {
- counter++;
+ //counter++;
}
} catch (InvalidInputException e) {
assertTrue(true);
@@ -1170,8 +1170,9 @@ public void test055() {
try {
token = scanner.getNextToken();
assertEquals("Wrong token type", ITerminalSymbols.TokenNameStringLiteral, token);
- char[] characters = scanner.getCurrentTokenSource();
- String results = String.valueOf(characters);
+ //char[] characters =
+ scanner.getCurrentTokenSource();
+ //String results = String.valueOf(characters);
token = scanner.getNextToken();
assertEquals("Wrong token type", ITerminalSymbols.TokenNameSEMICOLON, token);
} catch (InvalidInputException e) {
@@ -1189,8 +1190,10 @@ public void test056() {
int token = 0;
try {
token = scanner.getNextToken();
- char[] characters = scanner.getCurrentTokenSource();
- String results = String.valueOf(characters);
+ scanner.getCurrentTokenSource();
+ //char[] characters =
+ scanner.getCurrentTokenSource();
+ //String results = String.valueOf(characters);
assertEquals("Wrong token type", ITerminalSymbols.TokenNameStringLiteral, token);
token = scanner.getNextToken();
assertEquals("Wrong token type", ITerminalSymbols.TokenNameSEMICOLON, token);

0 comments on commit d1aecfe

Please sign in to comment.
Something went wrong with that request. Please try again.