From cca75c8ce0bb1ac214121ac8d5c53782d68aeab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Fri, 25 Jan 2008 17:05:01 +0000 Subject: [PATCH] Base class tests git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2918 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Debugger.Tests.csproj | 1 + .../Project/Src/TestPrograms/ArrayValue.cs | 17 ++ .../Src/TestPrograms/PrimitiveValue.cs | 167 ++++++++++++++++++ 3 files changed, 185 insertions(+) create mode 100644 src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Debugger.Tests.csproj b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Debugger.Tests.csproj index e2a8029935..b7d1bd85c7 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Debugger.Tests.csproj +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Debugger.Tests.csproj @@ -59,6 +59,7 @@ + diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs index 1be2d984a6..dfe9b34ebe 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs @@ -29,11 +29,15 @@ namespace Debugger.Tests { [NUnit.Framework.Test] public void ArrayValue() { + ExpandProperties( + "DebugType.BaseType" + ); StartTest("ArrayValue.cs"); Value array = process.SelectedStackFrame.GetLocalVariableValue("array"); ObjectDump("array", array); ObjectDump("array elements", array.GetArrayElements()); + ObjectDump("type", array.Type); EndTest(); } @@ -141,6 +145,19 @@ namespace Debugger.Tests { System.Int32 + + + System.Int32[] + True + True + False + False + False + False + False + System.Array + + diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs new file mode 100644 index 0000000000..6570109f68 --- /dev/null +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs @@ -0,0 +1,167 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace Debugger.Tests.TestPrograms +{ + public class PrimitiveValue + { + public static void Main() + { + bool b = true; + int i = 5; + string s = "five"; + double d = 5.5; + System.Diagnostics.Debugger.Break(); + } + } +} + +#if TEST_CODE +namespace Debugger.Tests { + public partial class DebuggerTests + { + [NUnit.Framework.Test] + public void PrimitiveValue() + { + ExpandProperties( + "Value.Type", + "DebugType.BaseType" + ); + StartTest("PrimitiveValue.cs"); + + ObjectDump("locals", process.SelectedStackFrame.GetLocalVariableValues()); + + EndTest(); + } + } +} +#endif + +#if EXPECTED_OUTPUT + + + + + mscorlib.dll + PrimitiveValue.exe + Break + + + + + + True + b + False + False + False + False + False + True + True + + + System.Boolean + False + False + False + False + False + True + False + System.Boolean + + + + + + + + 5 + i + False + False + True + False + False + True + 5 + + + System.Int32 + False + False + False + False + True + True + False + System.Int32 + + + + + + + + five + s + False + False + False + False + False + True + five + + + System.String + False + False + False + False + False + True + False + System.String + + + + + + + + 5.5 + d + False + False + False + False + False + True + 5.5 + + + System.Double + False + False + False + False + False + True + False + System.Double + + + + + + + +#endif // EXPECTED_OUTPUT \ No newline at end of file