We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6afc9e6 commit e611bbfCopy full SHA for e611bbf
2 files changed
src/testing/methodtest.cs
@@ -116,6 +116,21 @@ public static int[] TestOverloadedParams(int v, int[] args)
116
return args;
117
}
118
119
+ public static string TestOverloadedNoObject(int i)
120
+ {
121
+ return "Got int";
122
+ }
123
+
124
+ public static string TestOverloadedObject(int i)
125
126
127
128
129
+ public static string TestOverloadedObject(object o)
130
131
+ return "Got object";
132
133
134
public static bool TestStringOutParams(string s, out string s1)
135
{
136
s1 = "output string";
src/tests/test_method.py
@@ -769,3 +769,25 @@ def test_wrong_overload():
769
res = System.Math.Max(System.Double(50.5), 50.1)
770
assert res == 50.5
771
assert type(res) == float
772
773
774
+def test_no_object_in_param():
775
+ """Test that fix for #203 doesn't break behavior w/ no object overload"""
776
777
+ res = MethodTest.TestOverloadedNoObject(5)
778
+ assert res == "Got int"
779
780
+ with pytest.raises(TypeError):
781
+ MethodTest.TestOverloadedNoObject("test")
782
783
784
+@pytest.mark.xfail(reason="Needs fixing. #203")
785
+def test_object_in_param():
786
+ """Test regression introduced by #151 in which Object method overloads
787
+ aren't being used. See #203 for issue."""
788
789
+ res = MethodTest.TestOverloadedObject(5)
790
791
792
+ res = MethodTest.TestOverloadedObject("test")
793
+ assert res == "Got object"
0 commit comments