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);
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;
+
+ // string constructor
+ var stringType = vm.RootDomain.Corlib.GetType ("System.String");
+ var stringConstructor = stringType.GetMethods ().Single (c=>
+ c.Name == ".ctor" &&
+ c.GetParameters ().Length == 2 &&
+ c.GetParameters ()[0].ParameterType.Name == "Char" &&
+ c.GetParameters ()[1].ParameterType.Name == "Int32");
+ var str = stringType.NewInstance (e.Thread, stringConstructor, new Value [] { vm.CreateValue ('a'), vm.CreateValue (3)});
+
+ AssertValue("aaa", str);
+
// pass primitive
m = t.GetMethod ("invoke_pass_primitive");
Value[] args = new Value [] {
frames = thread.GetFrames ();
Assert.AreEqual (8, frames.Length, "#7");
- Assert.AreEqual ("WaitOne_internal", frames [0].Method.Name, "#8.0");
+ Assert.AreEqual ("Wait_internal", frames [0].Method.Name, "#8.0");
Assert.AreEqual ("WaitOneNative", frames [1].Method.Name, "#8.1");
Assert.AreEqual ("InternalWaitOne", frames [2].Method.Name, "#8.2");
Assert.AreEqual ("WaitOne", frames [3].Method.Name, "#8.3");