@@ -280,6 +280,16 @@ def test_string_out_params():
280280 assert result [1 ] == "output string"
281281
282282
283+ def test_string_out_params_without_passing_string_value ():
284+ """Test use of string out-parameters."""
285+ # @eirannejad 2022-01-13
286+ result = MethodTest .TestStringOutParams ("hi" )
287+ assert isinstance (result , tuple )
288+ assert len (result ) == 2
289+ assert result [0 ] is True
290+ assert result [1 ] == "output string"
291+
292+
283293def test_string_ref_params ():
284294 """Test use of string byref parameters."""
285295 result = MethodTest .TestStringRefParams ("hi" , "there" )
@@ -308,6 +318,16 @@ def test_value_out_params():
308318 MethodTest .TestValueOutParams ("hi" , None )
309319
310320
321+ def test_value_out_params_without_passing_string_value ():
322+ """Test use of string out-parameters."""
323+ # @eirannejad 2022-01-13
324+ result = MethodTest .TestValueOutParams ("hi" )
325+ assert isinstance (result , tuple )
326+ assert len (result ) == 2
327+ assert result [0 ] is True
328+ assert result [1 ] == 42
329+
330+
311331def test_value_ref_params ():
312332 """Test use of value type byref parameters."""
313333 result = MethodTest .TestValueRefParams ("hi" , 1 )
@@ -336,6 +356,15 @@ def test_object_out_params():
336356 assert isinstance (result [1 ], System .Exception )
337357
338358
359+ def test_object_out_params_without_passing_string_value ():
360+ """Test use of object out-parameters."""
361+ result = MethodTest .TestObjectOutParams ("hi" )
362+ assert isinstance (result , tuple )
363+ assert len (result ) == 2
364+ assert result [0 ] is True
365+ assert isinstance (result [1 ], System .Exception )
366+
367+
339368def test_object_ref_params ():
340369 """Test use of object byref parameters."""
341370 result = MethodTest .TestObjectRefParams ("hi" , MethodTest ())
@@ -364,6 +393,15 @@ def test_struct_out_params():
364393 MethodTest .TestValueRefParams ("hi" , None )
365394
366395
396+ def test_struct_out_params_without_passing_string_value ():
397+ """Test use of struct out-parameters."""
398+ result = MethodTest .TestStructOutParams ("hi" )
399+ assert isinstance (result , tuple )
400+ assert len (result ) == 2
401+ assert result [0 ] is True
402+ assert isinstance (result [1 ], System .Guid )
403+
404+
367405def test_struct_ref_params ():
368406 """Test use of struct byref parameters."""
369407 result = MethodTest .TestStructRefParams ("hi" , System .Guid .NewGuid ())
0 commit comments