Skip to content

Commit

Permalink
Document that setupGraphInconsistencyReceiver calls tester.initialize…
Browse files Browse the repository at this point in the history
…, which can blow away any transformer, and say that in tester.initialize.

PiperOrigin-RevId: 295818332
  • Loading branch information
janakdr authored and copybara-github committed Feb 18, 2020
1 parent b77a865 commit e904605
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ private static SkyKey toSkyKey(String name) {
*
* <p>Returns a concurrent {@link Set} containing {@link InconsistencyData}s discovered during
* evaluation. Callers should assert the desired properties on the returned set.
*
* <p>Calls {@code tester.initialize} under the hood, so call early in test setup!
*/
protected Set<InconsistencyData> setupGraphInconsistencyReceiver(boolean allowDuplicates) {
Set<InconsistencyData> inconsistencies = Sets.newConcurrentHashSet();
Expand Down Expand Up @@ -205,6 +207,7 @@ protected Set<InconsistencyData> setupGraphInconsistencyReceiver(boolean allowDu
return inconsistencies;
}

/** Calls {@code tester.initialize} under the hood, so call early in test setup! */
protected Set<InconsistencyData> setupGraphInconsistencyReceiver() {
return setupGraphInconsistencyReceiver(/*allowDuplicates=*/ false);
}
Expand Down Expand Up @@ -5285,6 +5288,7 @@ protected class MemoizingEvaluatorTester extends GraphTester {
GraphInconsistencyReceiver.THROWING;
private EventFilter eventFilter = InMemoryMemoizingEvaluator.DEFAULT_STORED_EVENT_FILTER;

/** Constructs a new {@link #evaluator}, so call before injecting a transformer into it! */
public void initialize(boolean keepEdges) {
this.differencer = getRecordingDifferencer();
this.evaluator =
Expand Down

0 comments on commit e904605

Please sign in to comment.