From 03a4e7c58949ed5eaabd7651cdef0c14fc2ec228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Wed, 16 Jan 2008 12:03:07 +0000 Subject: [PATCH] Tests output - use name of dumped object as the XML node name. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2857 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/DebuggerTestsBase.cs | 8 ++--- .../Project/Src/TestPrograms/ArrayValue.cs | 8 ++--- .../Project/Src/TestPrograms/Callstack.cs | 12 +++---- .../TestPrograms/FunctionArgumentVariables.cs | 20 ++++++------ .../Src/TestPrograms/FunctionLifetime.cs | 32 +++++++++---------- .../TestPrograms/FunctionLocalVariables.cs | 4 +-- .../Project/Src/TestPrograms/Generics.cs | 32 +++++++++---------- .../Project/Src/TestPrograms/Stepping.cs | 18 +++++------ .../Project/Src/TestPrograms/ValueType.cs | 4 +-- 9 files changed, 68 insertions(+), 70 deletions(-) diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs index 079eca6d86..478777ded5 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs @@ -158,21 +158,19 @@ namespace Debugger.Tests public void ObjectDump(object obj) { - ObjectDump(null, obj); + ObjectDump("Object", obj); } public void ObjectDump(string name, object obj) { - XmlElement dumpNode = testDoc.CreateElement("Object"); - if (name != null) dumpNode.SetAttribute("name", name); + XmlElement dumpNode = testDoc.CreateElement(XmlConvert.EncodeName(name.Replace(" ", "_"))); testNode.AppendChild(dumpNode); Serialize(dumpNode, obj, 16, new List()); } public void ObjectDumpToString(string name, object obj) { - XmlElement dumpNode = testDoc.CreateElement("Object"); - if (name != null) dumpNode.SetAttribute("name", name); + XmlElement dumpNode = testDoc.CreateElement(XmlConvert.EncodeName(name.Replace(" ", "_"))); testNode.AppendChild(dumpNode); if (obj == null) { dumpNode.AppendChild(dumpNode.OwnerDocument.CreateTextNode("null")); 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 d108b4b2ac..efdcad8b6c 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 @@ -51,7 +51,7 @@ namespace Debugger.Tests { mscorlib.dll ArrayValue.exe Break - + True 5 1 @@ -66,8 +66,8 @@ namespace Debugger.Tests { {System.Int32[]} False System.Int32[] - - + + 5 False @@ -149,7 +149,7 @@ namespace Debugger.Tests { False System.Int32 - + diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs index ec5992f4b3..80ab483cda 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs @@ -63,7 +63,7 @@ namespace Debugger.Tests { mscorlib.dll Callstack.exe Break - + 3 Sub2 @@ -98,9 +98,9 @@ namespace Debugger.Tests { [ValueCollection Count=0] [ValueCollection Count=0] - + StepComplete - + 2 Sub1 @@ -124,9 +124,9 @@ namespace Debugger.Tests { [ValueCollection Count=0] [ValueCollection Count=0] - + StepComplete - + 1 Main @@ -139,7 +139,7 @@ namespace Debugger.Tests { [ValueCollection Count=0] [ValueCollection Count=0] - + diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs index cb4b7397ce..282d566b3e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs @@ -97,7 +97,7 @@ namespace Debugger.Tests { FunctionArgumentVariables.exe Break Break - + 9 False @@ -243,9 +243,9 @@ namespace Debugger.Tests { False System.Nullable<System.Int32> - + Break - + 1 True @@ -263,9 +263,9 @@ namespace Debugger.Tests { False System.String[] - + Break - + 1 True @@ -283,9 +283,9 @@ namespace Debugger.Tests { False System.String[] - + Break - + 1 True @@ -303,9 +303,9 @@ namespace Debugger.Tests { False System.String[] - + Break - + 2 False @@ -339,7 +339,7 @@ namespace Debugger.Tests { False System.String - + diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs index 9860677d5d..689735877a 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs @@ -75,7 +75,7 @@ namespace Debugger.Tests { mscorlib.dll FunctionLifetime.exe Break - + Function True False @@ -85,9 +85,9 @@ namespace Debugger.Tests { 1 [ValueCollection Count=1] [ValueCollection Count=0] - + Break - + Function True True @@ -97,8 +97,8 @@ namespace Debugger.Tests { [ValueCollection Count=0] - - + + SubFunction True False @@ -108,9 +108,9 @@ namespace Debugger.Tests { 0 [ValueCollection Count=0] [ValueCollection Count=0] - + Break - + Function True True @@ -120,8 +120,8 @@ namespace Debugger.Tests { [ValueCollection Count=0] - - + + Function True False @@ -131,9 +131,9 @@ namespace Debugger.Tests { 1 [ValueCollection Count=1] [ValueCollection Count=0] - + Break - +
Main True False @@ -143,8 +143,8 @@ namespace Debugger.Tests { 0 [ValueCollection Count=0] [ValueCollection Count=0] -
- + + Function True True @@ -154,8 +154,8 @@ namespace Debugger.Tests { [ValueCollection Count=0] - - + + Main True False @@ -165,7 +165,7 @@ namespace Debugger.Tests { 0 [ValueCollection Count=0] [ValueCollection Count=0] - + diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs index db846a5bce..963e86d32a 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs @@ -50,7 +50,7 @@ namespace Debugger.Tests { mscorlib.dll FunctionLocalVariables.exe Break - + 5 False @@ -132,7 +132,7 @@ namespace Debugger.Tests { False System.Object - + diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs index 6491bf3265..42ab3c7f08 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs @@ -121,7 +121,7 @@ namespace Debugger.Tests { mscorlib.dll Generics.exe Break - + Metod False @@ -186,9 +186,9 @@ namespace Debugger.Tests { [ValueCollection Count=0] - + Break - + GenericMethod False @@ -253,9 +253,9 @@ namespace Debugger.Tests { [ValueCollection Count=0] - + Break - + StaticMetod False @@ -320,9 +320,9 @@ namespace Debugger.Tests { [ValueCollection Count=0] - + Break - + StaticGenericMethod False @@ -387,9 +387,9 @@ namespace Debugger.Tests { [ValueCollection Count=0] - + Break - + Metod False @@ -454,9 +454,9 @@ namespace Debugger.Tests { [ValueCollection Count=0] - + Break - + GenericMethod False @@ -521,9 +521,9 @@ namespace Debugger.Tests { [ValueCollection Count=0] - + Break - + StaticMetod False @@ -588,9 +588,9 @@ namespace Debugger.Tests { [ValueCollection Count=0] - + Break - + StaticGenericMethod False @@ -655,7 +655,7 @@ namespace Debugger.Tests { [ValueCollection Count=0] - + Break diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs index a07217176e..c77566dd2d 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs @@ -93,30 +93,30 @@ namespace Debugger.Tests { Stepping.exe System.dll Break - Start=16,4 End=16,40 + Start=16,4 End=16,40 StepComplete - Start=17,4 End=17,44 + Start=17,4 End=17,44 System.Configuration.dll System.Xml.dll 1\r\n StepComplete - Start=18,4 End=18,10 + Start=18,4 End=18,10 StepComplete - Start=23,3 End=23,4 + Start=23,3 End=23,4 StepComplete - Start=24,4 End=24,44 + Start=24,4 End=24,44 2\r\n StepComplete - Start=25,4 End=25,44 + Start=25,4 End=25,44 3\r\n 4\r\n StepComplete - Start=18,4 End=18,10 + Start=18,4 End=18,10 StepComplete - Start=19,4 End=19,11 + Start=19,4 End=19,11 5\r\n StepComplete - Start=20,3 End=20,4 + Start=20,3 End=20,4 diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs index 11d6f18103..54e222559b 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs @@ -54,7 +54,7 @@ namespace Debugger.Tests { mscorlib.dll ValueType.exe Break - + False @@ -105,7 +105,7 @@ namespace Debugger.Tests { - +