Skip to content

Commit

Permalink
Record added node output states as new (#61575)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbergen authored Feb 3, 2023
1 parent 95d69a4 commit bfae7f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ public void Modified_Entry_Adding_Outputs_Records_Added_Step_State()

values = ImmutableArray.Create(1, 2, 3);

// second time we'll see that the "Input" step is modified, but the outputs of the "SelectMany" step are modified.
// second time we'll see that the "Input" step is modified, but the outputs of the "SelectMany" step are new.
dstBuilder = GetBuilder(dstBuilder.ToImmutable(), trackIncrementalGeneratorSteps: true);
var table = dstBuilder.GetLatestStateTableForNode(transformNode);

Expand All @@ -979,7 +979,7 @@ public void Modified_Entry_Adding_Outputs_Records_Added_Step_State()

Assert.All(step.Outputs, output =>
{
Assert.Equal(IncrementalStepRunReason.Modified, output.Reason);
Assert.Equal(IncrementalStepRunReason.New, output.Reason);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ private static IncrementalStepRunReason AsStepState(EntryState inputState, Entry
(EntryState.Cached, EntryState.Cached) => IncrementalStepRunReason.Cached,
(EntryState.Removed, EntryState.Removed) => IncrementalStepRunReason.Removed,
(EntryState.Modified, EntryState.Removed) => IncrementalStepRunReason.Removed,
(EntryState.Modified, EntryState.Added) => IncrementalStepRunReason.Modified,
(EntryState.Modified, EntryState.Added) => IncrementalStepRunReason.New,
_ => throw ExceptionUtilities.UnexpectedValue((inputState, outputState))
};
}
Expand Down

0 comments on commit bfae7f9

Please sign in to comment.