Skip to content

Commit 3d4fb14

Browse files
committed
Add test for ienumerable method
1 parent 4a9457f commit 3d4fb14

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/testing/methodtest.cs

+5
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ public static int[] TestOverloadedParams(int v, int[] args)
117117
return args;
118118
}
119119

120+
public static int TestIEnumerable(System.Collections.Generic.IEnumerable<object> arg)
121+
{
122+
return 1;
123+
}
124+
120125
public static string TestOverloadedNoObject(int i)
121126
{
122127
return "Got int";

src/tests/test_method.py

+5
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ def test_null_array_conversion():
204204
r = ob.TestNullArrayConversion(None)
205205
assert r is None
206206

207+
def test_ienumerable_args():
208+
"""Test conversion of python lists and tuples to IEnumerable<object>"""
209+
ob = MethodTest()
210+
x = ob.TestIEnumerable([1,2,3])
211+
y = ob.TestIEnumerable((1,2,3))
207212

208213
def test_string_params_args():
209214
"""Test use of string params."""

0 commit comments

Comments
 (0)