Skip to content

Commit 0e5c2fd

Browse files
jkotasstephentoub
authored andcommitted
Fix StackTrace test for pretty-printing updates
Commit migrated from dotnet/corefx@031cf3c
1 parent 25069d8 commit 0e5c2fd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/libraries/System.Diagnostics.StackTrace/tests/StackTraceTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ public void ToString_Invoke_ReturnsExpected(StackTrace stackTrace, string expect
288288
Assert.EndsWith(Environment.NewLine, toString);
289289

290290
string[] frames = toString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
291-
Assert.Equal(frames.Length, stackTrace.FrameCount);
291+
// StackTrace pretty printer omits uninteresting frames from the formatted stacktrace
292+
AssertExtensions.LessThanOrEqualTo(frames.Length, stackTrace.FrameCount);
292293
}
293294
}
294295

0 commit comments

Comments
 (0)