1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
6
namespace Debugger.Tests
8
public class Value_Tests
10
public static void Main()
16
int[,] array = new int[2,2];
21
char[,] lbArray = (char[,])Array.CreateInstance(typeof(char), new int[] { 2, 2 }, new int[] { 10, 20 });
22
lbArray[10, 20] = 'a';
23
lbArray[10, 21] = 'b';
24
lbArray[11, 20] = 'c';
25
lbArray[11, 21] = 'd';
27
System.Diagnostics.Debugger.Break();
33
namespace Debugger.Tests {
34
public partial class DebuggerTests
36
[NUnit.Framework.Test]
37
public void Value_Tests()
43
Value array = process.SelectedStackFrame.GetLocalVariableValue("array").GetPermanentReference();
44
ObjectDump("array.Length", array.GetMemberValue("Length"));
45
ObjectDump("array", array);
47
Value lbArray = process.SelectedStackFrame.GetLocalVariableValue("lbArray").GetPermanentReference();
48
ObjectDump("lbArray", lbArray);
49
ObjectDump("lbArray-10-20", lbArray.GetArrayElement(new int[] {10, 20}));
58
<?xml version="1.0" encoding="utf-8"?>
61
name="Value_Tests.cs">
63
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded>
64
<ModuleLoaded>Value_Tests.exe (Has symbols)</ModuleLoaded>
65
<DebuggingPaused>Break Value_Tests.cs:27,4-27,40</DebuggingPaused>
94
Type="System.Int32[,]"
95
Value="{System.Int32[,]}" />
100
Type="System.Char[,]"
101
Value="{System.Char[,]}" />
107
Type="System.Int32" />
111
ArrayDimensions="{2, 2}"
114
GetArrayElements="{0, 1, 2, 3}"
116
PrimitiveValue="{Exception: Value is not a primitive type}"
117
Type="System.Int32[,]" />
121
ArrayDimensions="{10..11, 20..21}"
124
GetArrayElements="{a, b, c, d}"
126
PrimitiveValue="{Exception: Value is not a primitive type}"
127
Type="System.Char[,]" />
132
Type="System.Char" />
137
#endif // EXPECTED_OUTPUT