Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3d4fb14

Browse files
committed
Add test for ienumerable method
1 parent4a9457f commit3d4fb14

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎src/testing/methodtest.cs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ public static int[] TestOverloadedParams(int v, int[] args)
117117
returnargs;
118118
}
119119

120+
publicstaticintTestIEnumerable(System.Collections.Generic.IEnumerable<object>arg)
121+
{
122+
return1;
123+
}
124+
120125
publicstaticstringTestOverloadedNoObject(inti)
121126
{
122127
return"Got int";

‎src/tests/test_method.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ def test_null_array_conversion():
204204
r=ob.TestNullArrayConversion(None)
205205
assertrisNone
206206

207+
deftest_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
deftest_string_params_args():
209214
"""Test use of string params."""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp