From 5cce48f44d8a11658d382fdb7e26d1c8c57e284e Mon Sep 17 00:00:00 2001 From: Laurent Le Brun Date: Thu, 29 Oct 2015 17:20:16 +0000 Subject: Cleanup, TODO removal -- MOS_MIGRATED_REVID=106605940 --- .../devtools/build/lib/syntax/IfStatement.java | 4 ---- .../devtools/build/lib/syntax/LineNumberTable.java | 1 - .../build/lib/syntax/util/EvaluationTestCase.java | 27 ---------------------- 3 files changed, 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 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 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; -- cgit v1.2.3