aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mark Schaller <mschaller@google.com>2016-03-07 17:36:37 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-03-08 03:44:34 +0000
commit342b0b808c58917ec03beac2ed093118996ec421 (patch)
tree5b558c3cf027c30174858a61151dd2265423fc4e
parentb525beeb7db758b6b73aec0153b2ec8c4a028a17 (diff)
Add unsetComputedValue method to GraphTester
Useful for manipulating computed value nodes in tests. -- MOS_MIGRATED_REVID=116555900
-rw-r--r--src/test/java/com/google/devtools/build/skyframe/GraphTester.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/skyframe/GraphTester.java b/src/test/java/com/google/devtools/build/skyframe/GraphTester.java
index 8cca7acab0..a5eb7177b9 100644
--- a/src/test/java/com/google/devtools/build/skyframe/GraphTester.java
+++ b/src/test/java/com/google/devtools/build/skyframe/GraphTester.java
@@ -218,6 +218,11 @@ public class GraphTester {
return this;
}
+ public TestFunction unsetComputedValue() {
+ this.computer = null;
+ return this;
+ }
+
public TestFunction setBuilder(SkyFunction builder) {
Preconditions.checkState(this.value == null);
Preconditions.checkState(this.computer == null);