Skip to content

Commit 424317f

Browse files
committed
Add tests from @denfromufa
1 parent f7e4870 commit 424317f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/testing/methodtest.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,21 @@ public static string TestOverloadedObjectTwo(int a, int b)
136136
return "Got int-int";
137137
}
138138

139+
public static string TestOverloadedObjectTwo(string a, string b)
140+
{
141+
return "Got string-string";
142+
}
143+
144+
public static string TestOverloadedObjectTwo(string a, int b)
145+
{
146+
return "Got string-int";
147+
}
148+
149+
public static string TestOverloadedObjectTwo(string a, object b)
150+
{
151+
return "Got string-object";
152+
}
153+
139154
public static string TestOverloadedObjectTwo(int a, object b)
140155
{
141156
return "Got int-object";

src/tests/test_method.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,15 @@ def test_object_in_multiparam():
807807
res = MethodTest.TestOverloadedObjectTwo("foo", "bar")
808808
assert res == "Got object-object"
809809

810+
res = MethodTest.TestOverloadedObjectTwo("foo", System.Object)
811+
assert res == "Got string-object"
812+
813+
res = MethodTest.TestOverloadedObjectTwo("foo", "bar")
814+
assert res == "Got string-string"
815+
816+
res = MethodTest.TestOverloadedObjectTwo("foo", 5)
817+
assert res == "Got string-int"
818+
810819

811820
def test_object_in_multiparam_exception():
812821
"""Test method with object multiparams behaves"""

0 commit comments

Comments
 (0)