Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2016-10-03 17:09:59 +0300
committerMarek Safar <marek.safar@gmail.com>2016-10-03 17:10:57 +0300
commit0034b230e838db24bb41bb6e19814f65bc88faff (patch)
treeaaab3db5271fabc3c203a799f187cc0e1b7ab305 /mcs/class/Mono.Debugger.Soft
parent2107695a7ab8fed20a06913dcce5a4fd7dc16d3d (diff)
[Mono.Debugger.Soft] Tweak ClassLocalReflection test
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft')
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs36
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest.cs12
2 files changed, 29 insertions, 19 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
index cc2ab66960f..42a02d6f16f 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
@@ -1620,6 +1620,25 @@ public class Foo
public ProcessStartInfo info;
}
+class LocalReflectClass
+{
+ public static void RunMe ()
+ {
+ var reflectMe = new someClass ();
+ var temp = reflectMe; // Breakpoint location
+ reflectMe.someMethod ();
+ }
+
+ class someClass : ContextBoundObject
+ {
+ public object someField;
+
+ public void someMethod ()
+ {
+ }
+ }
+}
+
// Class used for line number info testing, don't change its layout
public class LineNumbers
{
@@ -1643,22 +1662,5 @@ public class LineNumbers
}
}
-class LocalReflectClass
-{
- public static void RunMe ()
- {
- var reflectMe = new someClass ();
- reflectMe.someMethod ();
- }
-
- class someClass : ContextBoundObject
- {
- public object someField;
-
- public void someMethod ()
- {
- }
- }
-}
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
index 505ab2abdbe..0eea592e2cf 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
@@ -558,7 +558,11 @@ public class DebuggerTests
MethodMirror m = entry_point.DeclaringType.Assembly.GetType ("LocalReflectClass").GetMethod ("RunMe");
Assert.IsNotNull (m);
- //Console.WriteLine ("X: " + name + " " + m.ILOffsets.Count + " " + m.Locations.Count);
+
+// foreach (var x in m.Locations) {
+// Console.WriteLine (x);
+// }
+
var offset = -1;
int method_base_linum = m.Locations [0].LineNumber;
foreach (var location in m.Locations)
@@ -586,7 +590,11 @@ public class DebuggerTests
e = single_step (e.Thread);
var frame = e.Thread.GetFrames ()[0];
- Value variable = frame.GetValue (frame.Method.GetLocal ("reflectMe"));
+
+ Assert.IsNotNull (frame);
+ var field = frame.Method.GetLocal ("reflectMe");
+ Assert.IsNotNull (field);
+ Value variable = frame.GetValue (field);
ObjectMirror thisObj = (ObjectMirror)variable;
TypeMirror thisType = thisObj.Type;