Browse Source

Fixing/updating debugger unit tests:

DebugType_CompilerGeneratedClasses,
ControlFlow_MainThreadExit,
Thread_Tests
newNRvisualizers
David Srbecký 13 years ago
parent
commit
efbbdca049
  1. 14
      src/AddIns/Debugger/Debugger.Tests/Tests/ControlFlow_MainThreadExit.cs
  2. 2
      src/AddIns/Debugger/Debugger.Tests/Tests/DebugType_CompilerGeneratedClasses.cs
  3. 21
      src/AddIns/Debugger/Debugger.Tests/Tests/Thread_Tests.cs

14
src/AddIns/Debugger/Debugger.Tests/Tests/ControlFlow_MainThreadExit.cs

@ -34,8 +34,6 @@ namespace Debugger.Tests { @@ -34,8 +34,6 @@ namespace Debugger.Tests {
[NUnit.Framework.Test]
public void ControlFlow_MainThreadExit()
{
if (IsDotnet45Installed())
NUnit.Framework.Assert.Ignore("Does not yet work on .NET 4.5!");
StartTest();
ObjectDump("ThreadsBeforeExit", process.Threads);
process.AsyncContinue();
@ -64,20 +62,20 @@ namespace Debugger.Tests { @@ -64,20 +62,20 @@ namespace Debugger.Tests {
Count="2">
<Item>
<Thread
Callstack="{static System.Void Debugger.Tests.ControlFlow_MainThreadExit.Main()}"
Callstack="{[Method Debugger.Tests.ControlFlow_MainThreadExit.Main]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="static System.Void Debugger.Tests.ControlFlow_MainThreadExit.Main()"
MostRecentStackFrame="[Method Debugger.Tests.ControlFlow_MainThreadExit.Main]"
Name=""
Priority="Normal"
RuntimeValue="{System.Threading.Thread}" />
</Item>
<Item>
<Thread
Callstack="{static Boolean System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, System.Int64 millisecondsTimeout, System.Boolean hasThreadAffinity, System.Boolean exitContext), Boolean System.Threading.WaitHandle.WaitOne(System.Int32 millisecondsTimeout, System.Boolean exitContext), Boolean System.Threading.WaitHandle.WaitOne(), static System.Void Debugger.Tests.ControlFlow_MainThreadExit.WaitForALongTime(), static System.Void System.Threading.ThreadHelper.ThreadStart_Context(System.Object state), static System.Void System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean ignoreSyncCtx), static System.Void System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state), System.Void System.Threading.ThreadHelper.ThreadStart()}"
Callstack="{[Method System.Threading.WaitHandle.InternalWaitOne], [Method System.Threading.WaitHandle.WaitOne], [Method System.Threading.WaitHandle.WaitOne], [Method Debugger.Tests.ControlFlow_MainThreadExit.WaitForALongTime], [Method System.Threading.ThreadHelper.ThreadStart_Context], [Method System.Threading.ExecutionContext.RunInternal], [Method System.Threading.ExecutionContext.Run], [Method System.Threading.ExecutionContext.Run], [Method System.Threading.ThreadHelper.ThreadStart]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="static Boolean System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, System.Int64 millisecondsTimeout, System.Boolean hasThreadAffinity, System.Boolean exitContext)"
MostRecentStackFrame="[Method System.Threading.WaitHandle.InternalWaitOne]"
Name="Worker thread"
Priority="Normal"
RuntimeValue="{System.Threading.Thread}" />
@ -95,10 +93,10 @@ namespace Debugger.Tests { @@ -95,10 +93,10 @@ namespace Debugger.Tests {
</Item>
<Item>
<Thread
Callstack="{static Boolean System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, System.Int64 millisecondsTimeout, System.Boolean hasThreadAffinity, System.Boolean exitContext), Boolean System.Threading.WaitHandle.WaitOne(System.Int32 millisecondsTimeout, System.Boolean exitContext), Boolean System.Threading.WaitHandle.WaitOne(), static System.Void Debugger.Tests.ControlFlow_MainThreadExit.WaitForALongTime(), static System.Void System.Threading.ThreadHelper.ThreadStart_Context(System.Object state), static System.Void System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean ignoreSyncCtx), static System.Void System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state), System.Void System.Threading.ThreadHelper.ThreadStart()}"
Callstack="{[Method System.Threading.WaitHandle.InternalWaitOne], [Method System.Threading.WaitHandle.WaitOne], [Method System.Threading.WaitHandle.WaitOne], [Method Debugger.Tests.ControlFlow_MainThreadExit.WaitForALongTime], [Method System.Threading.ThreadHelper.ThreadStart_Context], [Method System.Threading.ExecutionContext.RunInternal], [Method System.Threading.ExecutionContext.Run], [Method System.Threading.ExecutionContext.Run], [Method System.Threading.ThreadHelper.ThreadStart]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="static Boolean System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, System.Int64 millisecondsTimeout, System.Boolean hasThreadAffinity, System.Boolean exitContext)"
MostRecentStackFrame="[Method System.Threading.WaitHandle.InternalWaitOne]"
Name="Worker thread"
Priority="Normal"
RuntimeValue="{System.Threading.Thread}" />

2
src/AddIns/Debugger/Debugger.Tests/Tests/DebugType_CompilerGeneratedClasses.cs

@ -65,7 +65,7 @@ namespace Debugger.Tests { @@ -65,7 +65,7 @@ namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test]
[NUnit.Framework.Test, NUnit.Framework.Ignore("TODO: Compiler generated classes are missing from the metadata")]
public void DebugType_CompilerGeneratedClasses()
{
StartTest();

21
src/AddIns/Debugger/Debugger.Tests/Tests/Thread_Tests.cs

@ -10,6 +10,7 @@ namespace Debugger.Tests @@ -10,6 +10,7 @@ namespace Debugger.Tests
public static void Main()
{
System.Diagnostics.Debugger.Break();
// This line forces the internal thread object to be created
System.Threading.Thread.CurrentThread.Priority = System.Threading.ThreadPriority.AboveNormal;
System.Diagnostics.Debugger.Break();
System.Threading.Thread.CurrentThread.Name = "ThreadName";
@ -22,7 +23,7 @@ namespace Debugger.Tests @@ -22,7 +23,7 @@ namespace Debugger.Tests
namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test, NUnit.Framework.Ignore]
[NUnit.Framework.Test]
public void Thread_Tests()
{
StartTest();
@ -48,32 +49,32 @@ namespace Debugger.Tests { @@ -48,32 +49,32 @@ namespace Debugger.Tests {
<Paused>Thread_Tests.cs:12,4-12,40</Paused>
<Thread>
<Thread
Callstack="{static System.Void Debugger.Tests.Thread_Tests.Main()}"
Callstack="{[Method Debugger.Tests.Thread_Tests.Main]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="static System.Void Debugger.Tests.Thread_Tests.Main()"
MostRecentStackFrame="[Method Debugger.Tests.Thread_Tests.Main]"
Name=""
Priority="Normal"
RuntimeValue="{System.Threading.Thread}" />
RuntimeValue="null" />
</Thread>
<Paused>Thread_Tests.cs:14,4-14,40</Paused>
<Paused>Thread_Tests.cs:15,4-15,40</Paused>
<Thread>
<Thread
Callstack="{static System.Void Debugger.Tests.Thread_Tests.Main()}"
Callstack="{[Method Debugger.Tests.Thread_Tests.Main]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="static System.Void Debugger.Tests.Thread_Tests.Main()"
MostRecentStackFrame="[Method Debugger.Tests.Thread_Tests.Main]"
Name=""
Priority="AboveNormal"
RuntimeValue="{System.Threading.Thread}" />
</Thread>
<Paused>Thread_Tests.cs:16,4-16,40</Paused>
<Paused>Thread_Tests.cs:17,4-17,40</Paused>
<Thread>
<Thread
Callstack="{static System.Void Debugger.Tests.Thread_Tests.Main()}"
Callstack="{[Method Debugger.Tests.Thread_Tests.Main]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="static System.Void Debugger.Tests.Thread_Tests.Main()"
MostRecentStackFrame="[Method Debugger.Tests.Thread_Tests.Main]"
Name="ThreadName"
Priority="AboveNormal"
RuntimeValue="{System.Threading.Thread}" />

Loading…
Cancel
Save