diff options
author | David Karlaš <david.karlas@xamarin.com> | 2015-01-06 23:21:16 +0300 |
---|---|---|
committer | David Karlaš <david.karlas@xamarin.com> | 2015-01-06 23:21:16 +0300 |
commit | dcafac668cbe8f63b4e42ea7f8f032f13aba8221 (patch) | |
tree | afe2e09b4fff7c0191889317159c86244ebd4525 /main/src/addins/MonoDevelop.Debugger | |
parent | c564b1bd93c6d228ff8cfbea35239ed572dc31a7 (diff) |
[DebuggerTests] DebuggerDisplayMethodTest added
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger')
-rw-r--r-- | main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs | 14 | ||||
-rw-r--r-- | main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs index 254742d01e..00f9666e20 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs @@ -93,6 +93,8 @@ namespace MonoDevelop.Debugger.Tests.TestApp alist.Add (3); string modifyInLamda = ""; + var debugDisplayMethodTest = new DebuggerDisplayMethodTest (); + A c = new C (); A b = new B (); A a = new A (); @@ -427,6 +429,18 @@ class TheProxy } } +[DebuggerDisplay ("{GetDebuggerDisplay(), nq}")] +class DebuggerDisplayMethodTest +{ + int someInt = 32; + int someInt2 = 43; + + string GetDebuggerDisplay () + { + return "First Int:" + someInt + " Second Int:" + someInt2; + } +} + class Thing<T> { public class Done<U> 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 878658cd0e..55946d0303 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs @@ -1918,5 +1918,16 @@ namespace MonoDevelop.Debugger.Tests Assert.AreEqual ("bool", val.TypeName); Assert.AreEqual ("false", val.Value); } + + [Test] + public void DebugDisplayTest () + { + ObjectValue val; + if (AllowTargetInvokes) { + val = Eval ("debugDisplayMethodTest"); + Assert.AreEqual ("DebuggerDisplayMethodTest", val.TypeName); + Assert.AreEqual ("First Int:32 Second Int:43", val.Value); + } + } } } |