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
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ namespace System.Diagnostics.TraceSourceTests

public class TraceClassTests : IDisposable
{
private readonly string TestRunnerAssemblyName = Assembly.GetEntryAssembly().GetName().Name;

void IDisposable.Dispose()
{
TraceTestHelper.ResetState();
Expand Down Expand Up @@ -339,11 +337,12 @@ public void TraceTest01()
Trace.IndentLevel = 0;
Trace.WriteLine("Message end.");
textTL.Flush();
string testRunnerAssemblyName = Assembly.GetEntryAssembly()?.GetName().Name ?? string.Empty;
string newLine = Environment.NewLine;
var expected =
string.Format(
"Message start." + newLine + " This message should be indented.{0} Error: 0 : This error not be indented." + newLine + " {0} Error: 0 : This error is indented" + newLine + " {0} Warning: 0 : This warning is indented" + newLine + " {0} Warning: 0 : This warning is also indented" + newLine + " {0} Information: 0 : This information in indented" + newLine + " {0} Information: 0 : This information is also indented" + newLine + "Message end." + newLine + "",
TestRunnerAssemblyName
testRunnerAssemblyName
);

Assert.Equal(expected, textTL.Output);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ public void TimestampTest()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/39223", TestPlatforms.Browser)]
public void CallstackTest_NotEmpty()
{
var cache = new TraceEventCache();
Assert.NotEmpty(cache.Callstack);
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/39223", TestPlatforms.Browser)]
public void CallstackTest_ContainsExpectedFrames()
{
var cache = new TraceEventCache();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ public void WriteFooterTest(TraceOptions opts, int flagCount)
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/39223", TestPlatforms.Browser)]
[MethodImpl(MethodImplOptions.NoInlining)]
public void WriteFooterTest_Callstack()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public TestClass()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/38995", TestPlatforms.Browser)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/39223", TestPlatforms.Browser)]
public void StackTraceDoesNotStartWithInternalFrame()
{
string stackTrace = Environment.StackTrace;
Expand Down
1 change: 0 additions & 1 deletion src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.DiagnosticSource\tests\TestWithConfigSwitches\System.Diagnostics.DiagnosticSource.Switches.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.StackTrace\tests\System.Diagnostics.StackTrace.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.TextWriterTraceListener\tests\System.Diagnostics.TextWriterTraceListener.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.TraceSource\tests\System.Diagnostics.TraceSource.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.Tracing\tests\System.Diagnostics.Tracing.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Globalization.Calendars\tests\CalendarTestWithConfigSwitch\System.Globalization.CalendarsWithConfigSwitch.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Globalization.Calendars\tests\System.Globalization.Calendars.Tests.csproj" />
Expand Down