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

Commitc9ab4ea

Browse files
committed
Add method object exception tests
1 parent3770e5c commitc9ab4ea

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

‎src/testing/methodtest.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,16 @@ public static string TestOverloadedObjectTwo(object a, object b)
151151
return"Got object-object";
152152
}
153153

154+
publicstaticstringTestOverloadedObjectThree(objecta,intb)
155+
{
156+
return"Got object-int";
157+
}
158+
159+
publicstaticstringTestOverloadedObjectThree(inta,objectb)
160+
{
161+
return"Got int-object";
162+
}
163+
154164
publicstaticboolTestStringOutParams(strings,outstrings1)
155165
{
156166
s1="output string";

‎src/tests/test_method.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,3 +806,10 @@ def test_object_in_multiparam():
806806

807807
res=MethodTest.TestOverloadedObjectTwo("foo","bar")
808808
assertres=="Got object-object"
809+
810+
811+
deftest_object_in_multiparam_exception():
812+
"""Test method with object multiparams behaves"""
813+
814+
withpytest.raises(TypeError):
815+
MethodTest.TestOverloadedObjectThree("foo","bar")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp