Browse Source

Removed some redundant debugger tests; Re-enabled some old tests

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4866 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 17 years ago
parent
commit
9d5ae9f098
  1. 43
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Debugger.Tests.csproj
  2. 16
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/AppDomain.cs
  3. 42
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ControlFlow_DebuggeeKilled.cs
  4. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ControlFlow_NoBreak.cs
  5. 8
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugType.cs
  6. 94
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugType_ValueType.cs
  7. 63
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception.cs
  8. 29
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception_StackOverflow.cs
  9. 35
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FileRelease.cs
  10. 237
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackFrame_Arguments.cs
  11. 102
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackFrame_LocalVariables.cs
  12. 31
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Symbols.cs
  13. 68
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Value_PropertyVariableForm.cs
  14. 48
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Break.cs
  15. 7
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_HelloWorld.cs
  16. 48
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Template.cs

43
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Debugger.Tests.csproj

@ -45,23 +45,18 @@ @@ -45,23 +45,18 @@
<Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="Src\DebuggerTests.cs" />
<Compile Include="Src\DebuggerTestsBase.cs" />
<Compile Include="Src\TestPrograms\AppDomains.cs" />
<Compile Include="Src\TestPrograms\AppDomain.cs" />
<Compile Include="Src\TestPrograms\Value_Array.cs" />
<Compile Include="Src\TestPrograms\ExpressionEvaluator.cs" />
<Compile Include="Src\TestPrograms\_Break.cs" />
<Compile Include="Src\TestPrograms\Breakpoint.cs" />
<Compile Include="Src\TestPrograms\StackFrame_Callstack.cs" />
<Compile Include="Src\TestPrograms\DebugType_CompilerGeneratedClasses.cs" />
<Compile Include="Src\TestPrograms\ControlFlow_DebuggeeKilled.cs" />
<Compile Include="Src\TestPrograms\DebugType.cs" />
<Compile Include="Src\TestPrograms\DebugType_DefinedTypes.cs" />
<Compile Include="Src\TestPrograms\Exception.cs" />
<Compile Include="Src\TestPrograms\Exception_Custom.cs" />
<Compile Include="Src\TestPrograms\Expressions.cs" />
<Compile Include="Src\TestPrograms\FileRelease.cs" />
<Compile Include="Src\TestPrograms\StackFrame_Arguments.cs" />
<Compile Include="Src\TestPrograms\StackFrame_Lifetime.cs" />
<Compile Include="Src\TestPrograms\StackFrame_LocalVariables.cs" />
<Compile Include="Src\TestPrograms\StackFrame_VariablesLifetime.cs" />
<Compile Include="Src\TestPrograms\Value_GenericDictionary.cs" />
<Compile Include="Src\TestPrograms\DebugType_Generics.cs" />
@ -73,18 +68,42 @@ @@ -73,18 +68,42 @@
<Compile Include="Src\TestPrograms\Value_Object.cs" />
<Compile Include="Src\TestPrograms\Value_Primitive.cs" />
<Compile Include="Src\TestPrograms\Value_Property.cs" />
<Compile Include="Src\TestPrograms\Value_PropertyVariableForm.cs" />
<Compile Include="Src\TestPrograms\StackFrame_SetIP.cs" />
<Compile Include="Src\TestPrograms\_SimpleProgram.cs" />
<Compile Include="Src\TestPrograms\Exception_StackOverflow.cs" />
<Compile Include="Src\TestPrograms\ControlFlow_Stepping.cs" />
<Compile Include="Src\TestPrograms\Symbols.cs" />
<Compile Include="Src\TestPrograms\ControlFlow_TerminatePausedProcess.cs" />
<Compile Include="Src\TestPrograms\ControlFlow_TerminateRunningProcess.cs" />
<Compile Include="Src\TestPrograms\Thread_Name.cs" />
<Compile Include="Src\TestPrograms\DebugType_ValueType.cs" />
<Compile Include="Src\TestPrograms\_Template.cs" />
<EmbeddedResource Include="Src\TestPrograms\*.cs" />
<EmbeddedResource Include="Src\TestPrograms\AppDomain.cs" />
<EmbeddedResource Include="Src\TestPrograms\Breakpoint.cs" />
<EmbeddedResource Include="Src\TestPrograms\ControlFlow_DebuggeeKilled.cs" />
<EmbeddedResource Include="Src\TestPrograms\ControlFlow_MainThreadExit.cs" />
<EmbeddedResource Include="Src\TestPrograms\ControlFlow_NoBreak.cs" />
<EmbeddedResource Include="Src\TestPrograms\ControlFlow_Stepping.cs" />
<EmbeddedResource Include="Src\TestPrograms\ControlFlow_TerminatePausedProcess.cs" />
<EmbeddedResource Include="Src\TestPrograms\ControlFlow_TerminateRunningProcess.cs" />
<EmbeddedResource Include="Src\TestPrograms\DebugType.cs" />
<EmbeddedResource Include="Src\TestPrograms\DebugType_Access.cs" />
<EmbeddedResource Include="Src\TestPrograms\DebugType_CompilerGeneratedClasses.cs" />
<EmbeddedResource Include="Src\TestPrograms\DebugType_DefinedTypes.cs" />
<EmbeddedResource Include="Src\TestPrograms\DebugType_Generics.cs" />
<EmbeddedResource Include="Src\TestPrograms\DebugType_Identity.cs" />
<EmbeddedResource Include="Src\TestPrograms\Exception_Custom.cs" />
<EmbeddedResource Include="Src\TestPrograms\Exception_StackOverflow.cs" />
<EmbeddedResource Include="Src\TestPrograms\ExpressionEvaluator.cs" />
<EmbeddedResource Include="Src\TestPrograms\Expressions.cs" />
<EmbeddedResource Include="Src\TestPrograms\Process_MemoryReadWrite.cs" />
<EmbeddedResource Include="Src\TestPrograms\StackFrame_Callstack.cs" />
<EmbeddedResource Include="Src\TestPrograms\StackFrame_Lifetime.cs" />
<EmbeddedResource Include="Src\TestPrograms\StackFrame_SetIP.cs" />
<EmbeddedResource Include="Src\TestPrograms\StackFrame_VariablesLifetime.cs" />
<EmbeddedResource Include="Src\TestPrograms\Thread_Name.cs" />
<EmbeddedResource Include="Src\TestPrograms\Value_Array.cs" />
<EmbeddedResource Include="Src\TestPrograms\Value_GenericDictionary.cs" />
<EmbeddedResource Include="Src\TestPrograms\Value_Object.cs" />
<EmbeddedResource Include="Src\TestPrograms\Value_Primitive.cs" />
<EmbeddedResource Include="Src\TestPrograms\Value_Property.cs" />
<EmbeddedResource Include="Src\TestPrograms\_HelloWorld.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Src" />

16
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/AppDomains.cs → src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/AppDomain.cs

@ -9,7 +9,7 @@ using System; @@ -9,7 +9,7 @@ using System;
namespace Debugger.Tests.TestPrograms
{
public class AppDomains
public class AppDomain
{
public static void Main()
{
@ -39,9 +39,9 @@ namespace Debugger.Tests { @@ -39,9 +39,9 @@ namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test]
public void AppDomains()
public void AppDomain()
{
StartTest("AppDomains.cs");
StartTest("AppDomain.cs");
DebugType type1 = process.SelectedStackFrame.GetLocalVariableValue("one").Type;
DebugType type1b = process.SelectedStackFrame.GetLocalVariableValue("one").Type;
@ -63,15 +63,15 @@ namespace Debugger.Tests { @@ -63,15 +63,15 @@ namespace Debugger.Tests {
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test
name="AppDomains.cs">
name="AppDomain.cs">
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>AppDomains.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break AppDomains.cs:17,4-17,40</DebuggingPaused>
<ModuleLoaded>AppDomain.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break AppDomain.cs:17,4-17,40</DebuggingPaused>
<SameDomainEqual>True</SameDomainEqual>
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>AppDomains.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break AppDomains.cs:30,4-30,40</DebuggingPaused>
<ModuleLoaded>AppDomain.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break AppDomain.cs:30,4-30,40</DebuggingPaused>
<AppDomainName>myDomain Id=2</AppDomainName>
<OtherDomainEqual>False</OtherDomainEqual>
<AppDomainsEqual>False</AppDomainsEqual>

42
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ControlFlow_DebuggeeKilled.cs

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
// <file>
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <owner name="David Srbeck<EFBFBD>" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
@ -13,8 +13,6 @@ namespace Debugger.Tests.TestPrograms @@ -13,8 +13,6 @@ namespace Debugger.Tests.TestPrograms
{
public static void Main()
{
int id = System.Diagnostics.Process.GetCurrentProcess().Id;
System.Diagnostics.Debug.WriteLine(id.ToString());
System.Diagnostics.Debugger.Break();
}
}
@ -22,21 +20,37 @@ namespace Debugger.Tests.TestPrograms @@ -22,21 +20,37 @@ namespace Debugger.Tests.TestPrograms
#if TEST_CODE
namespace Debugger.Tests {
using NUnit.Framework;
public partial class DebuggerTests
{
// [NUnit.Framework.Test]
// public void ControlFlow_DebuggeeKilled()
// {
// StartTest("ControlFlow_DebuggeeKilled.cs");
// WaitForPause();
// Assert.AreNotEqual(null, lastLogMessage);
// System.Diagnostics.Process p = System.Diagnostics.Process.GetProcessById(int.Parse(lastLogMessage));
// p.Kill();
// process.WaitForExit();
// }
[NUnit.Framework.Test]
public void ControlFlow_DebuggeeKilled()
{
StartTest("ControlFlow_DebuggeeKilled.cs");
foreach(System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses()) {
if (p.ProcessName.StartsWith("ControlFlow_DebuggeeKilled"))
p.Kill();
}
process.WaitForExit();
EndTest();
}
}
}
#endif
#if EXPECTED_OUTPUT
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test
name="ControlFlow_DebuggeeKilled.cs">
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>ControlFlow_DebuggeeKilled.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break ControlFlow_DebuggeeKilled.cs:16,4-16,40</DebuggingPaused>
<ProcessExited />
</Test>
</DebuggerTests>
#endif // EXPECTED_OUTPUT

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_SimpleProgram.cs → src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ControlFlow_NoBreak.cs

@ -9,7 +9,7 @@ using System; @@ -9,7 +9,7 @@ using System;
namespace Debugger.Tests.TestPrograms
{
public class _SimpleProgram
public class ControlFlow_NoBreak
{
public static void Main()
{
@ -23,9 +23,9 @@ namespace Debugger.Tests { @@ -23,9 +23,9 @@ namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test]
public void _SimpleProgram()
public void ControlFlow_NoBreak()
{
StartTest("_SimpleProgram.cs", false);
StartTest("ControlFlow_NoBreak.cs", false);
process.WaitForExit();

8
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugType.cs

@ -51,6 +51,10 @@ namespace Debugger.Tests.TestPrograms @@ -51,6 +51,10 @@ namespace Debugger.Tests.TestPrograms
public static unsafe void Main()
{
// TODO
// int? iNull = 5;
// int? iNull_null = null;
// The nulls should be first to test for "Value does not fall within the expected range." exception of .BaseType
MyClass nullMyClass = null;
object nullObject = null;
@ -125,7 +129,7 @@ namespace Debugger.Tests { @@ -125,7 +129,7 @@ namespace Debugger.Tests {
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>DebugType.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break DebugType.cs:76,4-76,40</DebuggingPaused>
<DebuggingPaused>Break DebugType.cs:80,4-80,40</DebuggingPaused>
<MyClassMemberts
Capacity="16"
Count="15">
@ -731,7 +735,7 @@ namespace Debugger.Tests { @@ -731,7 +735,7 @@ namespace Debugger.Tests {
</Value>
</Item>
</LocalVariables>
<DebuggingPaused>Break DebugType.cs:93,4-93,40</DebuggingPaused>
<DebuggingPaused>Break DebugType.cs:97,4-97,40</DebuggingPaused>
<Arguments
Capacity="16"
Count="15">

94
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugType_ValueType.cs

@ -1,94 +0,0 @@ @@ -1,94 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
namespace Debugger.Tests
{
public struct DebugType_ValueType
{
public static void Main()
{
new DebugType_ValueType().Fun();
}
public void Fun()
{
System.Diagnostics.Debugger.Break();
}
}
}
#if TEST_CODE
namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test]
public void DebugType_ValueType()
{
ExpandProperties(
"Value.Type",
"DebugType.BaseType"
);
StartTest("DebugType_ValueType.cs");
ObjectDump("this", process.SelectedStackFrame.GetThisValue());
EndTest();
}
}
}
#endif
#if EXPECTED_OUTPUT
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test
name="DebugType_ValueType.cs">
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>DebugType_ValueType.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break DebugType_ValueType.cs:21,4-21,40</DebuggingPaused>
<this>
<Value
AsString="{Debugger.Tests.DebugType_ValueType}"
Expression="this"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Debugger.Tests.DebugType_ValueType">
<Type>
<DebugType
BaseType="System.ValueType"
FullName="Debugger.Tests.DebugType_ValueType"
Kind="ValueType"
Module="DebugType_ValueType.exe"
Name="DebugType_ValueType">
<BaseType>
<DebugType
BaseType="System.Object"
FullName="System.ValueType"
Kind="Class"
Module="mscorlib.dll"
Name="ValueType">
<BaseType>
<DebugType
FullName="System.Object"
Kind="Class"
Module="mscorlib.dll"
Name="Object">
<BaseType>null</BaseType>
</DebugType>
</BaseType>
</DebugType>
</BaseType>
</DebugType>
</Type>
</Value>
</this>
<ProcessExited />
</Test>
</DebuggerTests>
#endif // EXPECTED_OUTPUT

63
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception.cs

@ -1,63 +0,0 @@ @@ -1,63 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
namespace Debugger.Tests.TestPrograms
{
public class Exception
{
public static void Main()
{
System.Diagnostics.Debugger.Break();
throw new System.Exception("test");
}
}
}
#if TEST_CODE
namespace Debugger.Tests {
using NUnit.Framework;
public partial class DebuggerTests
{
[NUnit.Framework.Test]
public void Exception()
{
StartTest("Exception.cs");
process.ExceptionThrown += delegate {
process.Terminate();
};
process.Paused += delegate {
// Should not be raised for dead process
Assert.Fail();
};
process.AsyncContinue();
process.WaitForExit();
EndTest();
}
}
}
#endif
#if EXPECTED_OUTPUT
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test
name="Exception.cs">
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>Exception.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break Exception.cs:16,4-16,40</DebuggingPaused>
<ExceptionThrown>System.Exception: test</ExceptionThrown>
<ProcessExited />
</Test>
</DebuggerTests>
#endif // EXPECTED_OUTPUT

29
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception_StackOverflow.cs

@ -28,17 +28,16 @@ namespace Debugger.Tests.TestPrograms @@ -28,17 +28,16 @@ namespace Debugger.Tests.TestPrograms
namespace Debugger.Tests {
public partial class DebuggerTests
{
// [NUnit.Framework.Test]
// [NUnit.Framework.Ignore("Different behaviour in .NET 4")]
// public void Exception_StackOverflow()
// {
// StartTest("Exception_StackOverflow.cs");
//
// process.Continue();
// //ObjectDump("LastStackFrame", process.SelectedThread.MostRecentStackFrame);
//
// EndTest();
// }
[NUnit.Framework.Test]
public void Exception_StackOverflow()
{
StartTest("Exception_StackOverflow.cs");
process.Continue();
//ObjectDump("LastStackFrame", process.SelectedThread.MostRecentStackFrame);
EndTest();
}
}
}
#endif
@ -47,13 +46,13 @@ namespace Debugger.Tests { @@ -47,13 +46,13 @@ namespace Debugger.Tests {
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test
name="StackOverflow.cs">
name="Exception_StackOverflow.cs">
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>StackOverflow.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break StackOverflow.cs:16,4-16,40</DebuggingPaused>
<ModuleLoaded>Exception_StackOverflow.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break Exception_StackOverflow.cs:16,4-16,40</DebuggingPaused>
<ExceptionThrown>Could not intercept: System.StackOverflowException</ExceptionThrown>
<DebuggingPaused>Exception StackOverflow.cs:22,4-22,22</DebuggingPaused>
<DebuggingPaused>Exception Exception_StackOverflow.cs:21,3-21,4</DebuggingPaused>
<ProcessExited />
</Test>
</DebuggerTests>

35
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FileRelease.cs

@ -1,35 +0,0 @@ @@ -1,35 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
namespace Debugger.Tests.TestPrograms
{
public class FileRelease
{
public static void Main()
{
}
}
}
#if TEST_CODE
namespace Debugger.Tests {
public partial class DebuggerTests
{
// [NUnit.Framework.Test]
// public void FileRelease()
// {
//
// }
}
}
#endif
#if EXPECTED_OUTPUT
#endif // EXPECTED_OUTPUT

237
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackFrame_Arguments.cs

@ -1,237 +0,0 @@ @@ -1,237 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
namespace Debugger.Tests.TestPrograms
{
public class StackFrame_Arguments
{
public static void Main()
{
System.Diagnostics.Debugger.Break();
int ref_i = 2;
int out_i;
int out_i2;
string ref_s = "B";
int? iNull = 5;
int? iNull_null = null;
StaticFunction(
1,
"A",
null,
ref ref_i,
out out_i,
out out_i2,
ref ref_s,
iNull,
iNull_null
);
VarArgs();
VarArgs("A");
VarArgs("A", "B");
new StackFrame_Arguments().Function(1, "A");
}
static void StaticFunction(int i,
string s,
string s_null,
ref int ref_i,
out int out_i,
out int out_i2,
ref string ref_s,
int? iNull,
int? iNull_null)
{
out_i = 3;
System.Diagnostics.Debugger.Break();
out_i2 = 4;
}
static void VarArgs(params string[] args)
{
System.Diagnostics.Debugger.Break();
}
void Function(int i, string s)
{
System.Diagnostics.Debugger.Break();
}
}
}
#if TEST_CODE
namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test]
public void StackFrame_Arguments()
{
StartTest("StackFrame_Arguments.cs");
for(int i = 0; i < 5; i++) {
process.Continue();
ObjectDump("Arguments", process.SelectedStackFrame.GetArgumentValues());
}
EndTest();
}
}
}
#endif
#if EXPECTED_OUTPUT
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test
name="StackFrame_Arguments.cs">
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>StackFrame_Arguments.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break StackFrame_Arguments.cs:16,4-16,40</DebuggingPaused>
<DebuggingPaused>Break StackFrame_Arguments.cs:51,4-51,40</DebuggingPaused>
<Arguments
Capacity="16"
Count="9">
<Item>
<Value
AsString="1"
Expression="i"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="A"
Expression="s"
IsReference="True"
PrimitiveValue="A"
Type="System.String" />
</Item>
<Item>
<Value
AsString="null"
Expression="s_null"
IsNull="True"
IsReference="True"
Type="System.String" />
</Item>
<Item>
<Value
AsString="2"
Expression="ref_i"
PrimitiveValue="2"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="3"
Expression="out_i"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="0"
Expression="out_i2"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="B"
Expression="ref_s"
IsReference="True"
PrimitiveValue="B"
Type="System.String" />
</Item>
<Item>
<Value
AsString="{System.Nullable&lt;System.Int32&gt;}"
Expression="iNull"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Nullable&lt;System.Int32&gt;" />
</Item>
<Item>
<Value
AsString="{System.Nullable&lt;System.Int32&gt;}"
Expression="iNull_null"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Nullable&lt;System.Int32&gt;" />
</Item>
</Arguments>
<DebuggingPaused>Break StackFrame_Arguments.cs:57,4-57,40</DebuggingPaused>
<Arguments
Capacity="4"
Count="1">
<Item>
<Value
ArrayDimensions="{0}"
ArrayRank="1"
AsString="{System.String[]}"
Expression="args"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
</Arguments>
<DebuggingPaused>Break StackFrame_Arguments.cs:57,4-57,40</DebuggingPaused>
<Arguments
Capacity="4"
Count="1">
<Item>
<Value
ArrayDimensions="{1}"
ArrayLength="1"
ArrayRank="1"
AsString="{System.String[]}"
Expression="args"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
</Arguments>
<DebuggingPaused>Break StackFrame_Arguments.cs:57,4-57,40</DebuggingPaused>
<Arguments
Capacity="4"
Count="1">
<Item>
<Value
ArrayDimensions="{2}"
ArrayLength="2"
ArrayRank="1"
AsString="{System.String[]}"
Expression="args"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
</Arguments>
<DebuggingPaused>Break StackFrame_Arguments.cs:62,4-62,40</DebuggingPaused>
<Arguments
Capacity="4"
Count="2">
<Item>
<Value
AsString="1"
Expression="i"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="A"
Expression="s"
IsReference="True"
PrimitiveValue="A"
Type="System.String" />
</Item>
</Arguments>
<ProcessExited />
</Test>
</DebuggerTests>
#endif // EXPECTED_OUTPUT

102
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackFrame_LocalVariables.cs

@ -1,102 +0,0 @@ @@ -1,102 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
namespace Debugger.Tests.TestPrograms
{
public class StackFrame_LocalVariables
{
public static void Main()
{
int i = 0;
string s = "S";
string[] args = new string[] {"p1"};
object n = null;
object o = new object();
System.Diagnostics.Debugger.Break();
}
}
}
#if TEST_CODE
namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test]
public void StackFrame_LocalVariables()
{
StartTest("StackFrame_LocalVariables.cs");
ObjectDump("LocalVariables", process.SelectedStackFrame.GetLocalVariableValues());
EndTest();
}
}
}
#endif
#if EXPECTED_OUTPUT
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test
name="StackFrame_LocalVariables.cs">
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>StackFrame_LocalVariables.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break StackFrame_LocalVariables.cs:21,4-21,40</DebuggingPaused>
<LocalVariables
Capacity="8"
Count="5">
<Item>
<Value
AsString="0"
Expression="i"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="S"
Expression="s"
IsReference="True"
PrimitiveValue="S"
Type="System.String" />
</Item>
<Item>
<Value
ArrayDimensions="{1}"
ArrayLength="1"
ArrayRank="1"
AsString="{System.String[]}"
Expression="args"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
<Item>
<Value
AsString="null"
Expression="n"
IsNull="True"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object" />
</Item>
<Item>
<Value
AsString="{System.Object}"
Expression="o"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object" />
</Item>
</LocalVariables>
<ProcessExited />
</Test>
</DebuggerTests>
#endif // EXPECTED_OUTPUT

31
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Symbols.cs

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
namespace Debugger.Tests.TestPrograms
{
public class Symbols
{
public static void Main()
{
System.Diagnostics.Debugger.Break();
}
}
}
#if TEST_CODE
namespace Debugger.Tests {
public partial class DebuggerTests
{
}
}
#endif
#if EXPECTED_OUTPUT
#endif // EXPECTED_OUTPUT

68
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Value_PropertyVariableForm.cs

@ -1,68 +0,0 @@ @@ -1,68 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Windows.Forms;
namespace Debugger.Tests.TestPrograms
{
public class Value_PropertyVariableForm
{
public static void Main()
{
Form form = new Form();
System.Diagnostics.Debugger.Break();
System.Diagnostics.Debugger.Break();
}
}
}
#if TEST_CODE
namespace Debugger.Tests {
public partial class DebuggerTests
{
/*
[NUnit.Framework.Test]
public void PropertyVariableForm()
{
Variable local = null;
StartProgram("PropertyVariableForm.cs");
WaitForPause();
foreach(Variable var in process.SelectedFunction.LocalVariables) {
local = var;
}
Assert.AreEqual("form", local.Name);
Assert.AreEqual(typeof(Variable), local.GetType());
foreach(Variable var in local.Value.SubVariables) {
Assert.AreEqual(typeof(UnavailableValue), var.Value.GetType(), "Variable name: " + var.Name);
process.StartEvaluation();
WaitForPause();
Assert.AreNotEqual(null, var.Value.AsString, "Variable name: " + var.Name);
}
process.Continue();
WaitForPause();
foreach(Variable var in local.Value.SubVariables) {
Assert.AreEqual(typeof(UnavailableValue), var.Value.GetType(), "Variable name: " + var.Name);
}
process.StartEvaluation();
WaitForPause();
process.Continue();
process.WaitForPrecessExit();
CheckXmlOutput();
}
*/
}
}
#endif
#if EXPECTED_OUTPUT
#endif // EXPECTED_OUTPUT

48
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Break.cs

@ -1,48 +0,0 @@ @@ -1,48 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
namespace Debugger.Tests.TestPrograms
{
public class _Break
{
public static void Main()
{
System.Diagnostics.Debugger.Break();
}
}
}
#if TEST_CODE
namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test]
public void _Break()
{
StartTest("_Break.cs");
EndTest();
}
}
}
#endif
#if EXPECTED_OUTPUT
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test
name="_Break.cs">
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>_Break.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break _Break.cs:16,4-16,40</DebuggingPaused>
<ProcessExited />
</Test>
</DebuggerTests>
#endif // EXPECTED_OUTPUT

7
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_HelloWorld.cs

@ -14,6 +14,8 @@ namespace Debugger.Tests.TestPrograms @@ -14,6 +14,8 @@ namespace Debugger.Tests.TestPrograms
public static void Main()
{
System.Diagnostics.Debug.WriteLine("Hello world!");
System.Diagnostics.Debugger.Break();
}
}
}
@ -25,9 +27,7 @@ namespace Debugger.Tests { @@ -25,9 +27,7 @@ namespace Debugger.Tests {
[NUnit.Framework.Test]
public void _HelloWorld()
{
StartTest("_HelloWorld.cs", false);
process.WaitForExit();
StartTest("_HelloWorld.cs");
EndTest();
}
@ -47,6 +47,7 @@ namespace Debugger.Tests { @@ -47,6 +47,7 @@ namespace Debugger.Tests {
<ModuleLoaded>System.Configuration.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>System.Xml.dll (No symbols)</ModuleLoaded>
<LogMessage>Hello world!\r\n</LogMessage>
<DebuggingPaused>Break _HelloWorld.cs:18,4-18,40</DebuggingPaused>
<ProcessExited />
</Test>
</DebuggerTests>

48
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Template.cs

@ -1,48 +0,0 @@ @@ -1,48 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
namespace Debugger.Tests.TestPrograms
{
public class _Template
{
public static void Main()
{
System.Diagnostics.Debugger.Break();
}
}
}
#if TEST_CODE
namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test]
public void _Template()
{
StartTest("_Template.cs");
EndTest();
}
}
}
#endif
#if EXPECTED_OUTPUT
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test
name="_Template.cs">
<ProcessStarted />
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>_Template.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break _Template.cs:16,4-16,40</DebuggingPaused>
<ProcessExited />
</Test>
</DebuggerTests>
#endif // EXPECTED_OUTPUT
Loading…
Cancel
Save