Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Build.UnitTests/NodeStatus_SizeChange_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Microsoft.Build.CommandLine.UnitTests;
[UsesVerify]
public class NodeStatus_SizeChange_Tests : IDisposable
{
private readonly TerminalNodeStatus _status = new("Namespace.Project", "TargetFramework", "Target", new MockStopwatch());
private readonly TerminalNodeStatus _status = new("Namespace.Project", "TargetFramework", null, "Target", new MockStopwatch());
private CultureInfo _currentCulture;

public NodeStatus_SizeChange_Tests()
Expand Down
14 changes: 7 additions & 7 deletions src/Build.UnitTests/NodeStatus_Transition_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void NodeStatusTargetThrowsForInputWithAnsi()
{
#if DEBUG
// This is testing a Debug.Assert, which won't throw in Release mode.
Func<TerminalNodeStatus> newNodeStatus = () => new TerminalNodeStatus("project", "tfm", AnsiCodes.Colorize("colorized target", TerminalColor.Green), new MockStopwatch());
Func<TerminalNodeStatus> newNodeStatus = () => new TerminalNodeStatus("project", "tfm", "rid", AnsiCodes.Colorize("colorized target", TerminalColor.Green), new MockStopwatch());
newNodeStatus.ShouldThrow<ArgumentException>().Message.ShouldContain("Target should not contain any escape codes, if you want to colorize target use the other constructor.");
#endif
}
Expand All @@ -39,10 +39,10 @@ public async Task NodeTargetChanges()
{
var rendered = Animate(
[
new("Namespace.Project", "TargetFramework", "Build", new MockStopwatch())
new("Namespace.Project", "TargetFramework", null, "Build", new MockStopwatch())
],
[
new("Namespace.Project", "TargetFramework", "Testing", new MockStopwatch())
new("Namespace.Project", "TargetFramework", null, "Testing", new MockStopwatch())
]);

await VerifyReplay(rendered);
Expand All @@ -54,7 +54,7 @@ public async Task NodeTargetUpdatesTime()
// This test look like there is no change between the frames, but we ask the stopwatch for time they will increase the number.
// We need this because animations check that NodeStatus reference is the same.
// And we cannot use MockStopwatch because we don't know when to call Tick on them, and if we do it right away, the time will update in "both" nodes.
TerminalNodeStatus node = new("Namespace.Project", "TargetFramework", "Build", new TickingStopwatch());
TerminalNodeStatus node = new("Namespace.Project", "TargetFramework", null, "Build", new TickingStopwatch());
var rendered = Animate(
[
node,
Expand All @@ -71,10 +71,10 @@ public async Task NodeTargetChangesToColoredTarget()
{
var rendered = Animate(
[
new("Namespace.Project", "TargetFramework", "Testing", new MockStopwatch())
new("Namespace.Project", "TargetFramework", null, "Testing", new MockStopwatch())
],
[
new("Namespace.Project", "TargetFramework", TerminalColor.Red, "failed", "MyTestName1", new MockStopwatch())
new("Namespace.Project", "TargetFramework", null, TerminalColor.Red, "failed", "MyTestName1", new MockStopwatch())
]);

await VerifyReplay(rendered);
Expand All @@ -86,7 +86,7 @@ public async Task NodeWithColoredTargetUpdatesTime()
// This test look like there is no change between the frames, but we ask the stopwatch for time they will increase the number.
// We need this because animations check that NodeStatus reference is the same.
// And we cannot use MockStopwatch because we don't know when to call Tick on them, and if we do it right away, the time will update in "both" nodes.
TerminalNodeStatus node = new("Namespace.Project", "TargetFramework", TerminalColor.Green, "passed", "MyTestName1", new TickingStopwatch());
TerminalNodeStatus node = new("Namespace.Project", "TargetFramework", null, TerminalColor.Green, "passed", "MyTestName1", new TickingStopwatch());
var rendered = Animate(
[
node,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
]9;4;3;\ project win-x64 succeeded (0.2s) → ]8;;file:///src\/src/project.dll]8;;\
[?25l
[?25h
Build succeeded in 5.0s
]9;4;0;\
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
 project win-x64 succeeded (0.2s) → ]8;;file:///src\/src/project.dll]8;;\
[?25l
[?25h
Build succeeded in 5.0s
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
]9;4;3;\ project win-x64 succeeded (0.2s) → ]8;;file:///C:/src\C:\src\project.dll]8;;\
[?25l
[?25h
Build succeeded in 5.0s
]9;4;0;\
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
]9;4;3;\ project net10.0 win-x64 succeeded (0.2s) → ]8;;file:///src\/src/project.dll]8;;\
[?25l
[?25h
Build succeeded in 5.0s
]9;4;0;\
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
 project net10.0 win-x64 succeeded (0.2s) → ]8;;file:///src\/src/project.dll]8;;\
[?25l
[?25h
Build succeeded in 5.0s
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
]9;4;3;\ project net10.0 win-x64 succeeded (0.2s) → ]8;;file:///C:/src\C:\src\project.dll]8;;\
[?25l
[?25h
Build succeeded in 5.0s
]9;4;0;\
Loading