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

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Karlaš <david.karlas@xamarin.com>2015-07-03 11:12:42 +0300
committerDavid Karlaš <david.karlas@xamarin.com>2015-07-03 11:12:42 +0300
commit693f753641d04683fca0ae6c3f2eec1b0fa6b13c (patch)
tree22013920c619a962db3010000ffc1ee0e7248c85 /main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests
parent4d5d03fac06020227952e219cc95b9025c4cf257 (diff)
[DebuggerTests] Added unit tests for invoking hidden members inside type
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests')
-rw-r--r--main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs40
1 files changed, 36 insertions, 4 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs
index cc8a833cc0..9371dfa6f2 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs
@@ -90,8 +90,8 @@ namespace MonoDevelop.Debugger.Tests
Assert.Ignore ("A newer version of the Mono runtime is required.");
ObjectValue val = Eval ("this");
- Assert.AreEqual ("{MonoDevelop.Debugger.Tests.TestApp.TestEvaluation}", val.Value);
- Assert.AreEqual ("MonoDevelop.Debugger.Tests.TestApp.TestEvaluation", val.TypeName);
+ Assert.AreEqual ("{MonoDevelop.Debugger.Tests.TestApp.TestEvaluationChild}", val.Value);
+ Assert.AreEqual ("MonoDevelop.Debugger.Tests.TestApp.TestEvaluationChild", val.TypeName);
}
[Test]
@@ -174,6 +174,38 @@ namespace MonoDevelop.Debugger.Tests
}
[Test]
+ public virtual void HiddenMembers ()
+ {
+ IgnoreCorDebugger ("TODO");
+ ObjectValue val;
+ val = Eval ("HiddenField");
+ Assert.AreEqual ("5", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("HiddenProperty");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("5", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("HiddenMethod()");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("5", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+ }
+
+ [Test]
public virtual void TypeReferenceGeneric ()
{
ObjectValue val;
@@ -1004,7 +1036,7 @@ namespace MonoDevelop.Debugger.Tests
Assert.AreEqual ("string", val.TypeName);
val = Eval ("this + \"a\"");
- Assert.AreEqual ("\"MonoDevelop.Debugger.Tests.TestApp.TestEvaluationa\"", val.Value);
+ Assert.AreEqual ("\"MonoDevelop.Debugger.Tests.TestApp.TestEvaluationChilda\"", val.Value);
Assert.AreEqual ("string", val.TypeName);
// Equality
@@ -2011,7 +2043,7 @@ namespace MonoDevelop.Debugger.Tests
val = val.Sync ();
}
Assert.AreEqual ("System.MonoType", val.TypeName);//Should this be System.Type?
- Assert.AreEqual ("{MonoDevelop.Debugger.Tests.TestApp.TestEvaluation}", val.Value);
+ Assert.AreEqual ("{MonoDevelop.Debugger.Tests.TestApp.TestEvaluationChild}", val.Value);
}
[Test]