aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Laurent Le Brun <laurentlb@google.com>2015-10-29 17:20:16 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-10-30 09:46:56 +0000
commit5cce48f44d8a11658d382fdb7e26d1c8c57e284e (patch)
treead8d4d3161b260eb224bc012495fee0299453a4e
parent5d96a28e5dbe43737df9297642132874cecdf1c3 (diff)
Cleanup, TODO removal
-- MOS_MIGRATED_REVID=106605940
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/IfStatement.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/LineNumberTable.java1
-rw-r--r--src/test/java/com/google/devtools/build/lib/syntax/util/EvaluationTestCase.java27
3 files changed, 0 insertions, 32 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/IfStatement.java b/src/main/java/com/google/devtools/build/lib/syntax/IfStatement.java
index 39293ac448..ffe29479bd 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/IfStatement.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/IfStatement.java
@@ -18,8 +18,6 @@ import com.google.common.collect.ImmutableList;
import java.util.List;
-// TODO(bazel-team): maybe we should get rid of the ConditionalStatements and
-// create a chain of if-else statements for elif-s.
/**
* Syntax node for an if/else statement.
*/
@@ -47,7 +45,6 @@ public final class IfStatement extends Statement {
@Override
public String toString() {
- // TODO(bazel-team): see TODO in the outer class
return "[el]if " + condition + ": " + stmts + "\n";
}
@@ -66,7 +63,6 @@ public final class IfStatement extends Statement {
@Override
void validate(ValidationEnvironment env) throws EvalException {
- // EvalUtils.toBoolean() evaluates everything so we don't need type check here.
condition.validate(env);
validateStmts(env, stmts);
}
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/LineNumberTable.java b/src/main/java/com/google/devtools/build/lib/syntax/LineNumberTable.java
index aba2674dd5..1720bd47e2 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/LineNumberTable.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/LineNumberTable.java
@@ -171,7 +171,6 @@ public abstract class LineNumberTable implements Serializable {
* Line number table implementation for source files that have been
* preprocessed. Ignores newlines and uses only #line directives.
*/
- // TODO(bazel-team): Use binary search instead of linear search.
@Immutable
public static class HashLine extends LineNumberTable {
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/util/EvaluationTestCase.java b/src/test/java/com/google/devtools/build/lib/syntax/util/EvaluationTestCase.java
index d598726099..1f7586a2d8 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/util/EvaluationTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/util/EvaluationTestCase.java
@@ -119,18 +119,10 @@ public class EvaluationTestCase {
return eventCollectionApparatus.reporter();
}
- protected PackageFactory getFactory() {
- return factory;
- }
-
public Environment getEnvironment() {
return env;
}
- public boolean isSkylark() {
- return env.isSkylark();
- }
-
protected List<Statement> parseFile(String... input) {
return env.parseFile(input);
}
@@ -174,15 +166,6 @@ public class EvaluationTestCase {
}
}
- public void checkEvalErrorStartsWith(String msg, String... input) throws Exception {
- try {
- eval(input);
- fail("Expected error starting with '" + msg + "' but got no error");
- } catch (IllegalArgumentException | EvalException e) {
- assertThat(e.getMessage()).startsWith(msg);
- }
- }
-
// Forward relevant methods to the EventCollectionApparatus
public EvaluationTestCase setFailFast(boolean failFast) {
eventCollectionApparatus.setFailFast(failFast);
@@ -206,16 +189,6 @@ public class EvaluationTestCase {
return eventCollectionApparatus.assertContainsWarning(expectedMessage);
}
- public List<Event> assertContainsEventWithFrequency(
- String expectedMessage, int expectedFrequency) {
- return eventCollectionApparatus.assertContainsEventWithFrequency(
- expectedMessage, expectedFrequency);
- }
-
- public Event assertContainsEventWithWordsInQuotes(String... words) {
- return eventCollectionApparatus.assertContainsEventWithWordsInQuotes(words);
- }
-
public EvaluationTestCase clearEvents() {
eventCollectionApparatus.clear();
return this;