diff options
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft')
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs | 8 | ||||
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Test/dtest.cs | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs index 400b43ce34f..d2b408a68ed 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs @@ -1165,10 +1165,18 @@ public class Tests : TestsBase, ITest2 return 42; } + public int invoke_pass_nullable (int? i) { + return (int)i; + } + public int? invoke_return_nullable_null () { return null; } + public int invoke_pass_nullable_null (int? i) { + return i.HasValue ? 1 : 2; + } + public void invoke_type_load () { new Class3 (); } diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs index 631b5985db1..5f80228fe2f 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs @@ -2617,6 +2617,11 @@ public class DebuggerTests m = s.Type.GetMethod ("ToString"); v = s.InvokeMethod (e.Thread, m, null); + // pass nullable as argument + m = t.GetMethod ("invoke_pass_nullable"); + v = this_obj.InvokeMethod (e.Thread, m, new Value [] { s }); + AssertValue (42, v); + // return nullable null m = t.GetMethod ("invoke_return_nullable_null"); v = this_obj.InvokeMethod (e.Thread, m, null); @@ -2630,6 +2635,13 @@ public class DebuggerTests m = s.Type.GetMethod ("ToString"); v = s.InvokeMethod (e.Thread, m, null); + // pass nullable null as argument + m = t.GetMethod ("invoke_pass_nullable_null"); + v = this_obj.InvokeMethod (e.Thread, m, new Value [] { s }); + AssertValue (2, v); + + return; + // pass primitive m = t.GetMethod ("invoke_pass_primitive"); Value[] args = new Value [] { |