| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e42ec3b commit 1e32d8c
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,4 +78,17 @@ public override string ToString() | |||
| 78 | 78 | return value; | |
| 79 | 79 | } | |
| 80 | 80 | } | |
| 81 | + | ||
| 82 | + public class MethodResolutionInt | ||
| 83 | + { | ||
| 84 | + public IEnumerable<byte> MethodA(ulong address, int size) | ||
| 85 | + { | ||
| 86 | + return new byte[10]; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + public int MethodA(string dummy, ulong address, int size) | ||
| 90 | + { | ||
| 91 | + return 0; | ||
| 92 | + } | ||
| 93 | + } | ||
| 81 | 94 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | import pytest | |
| 5 | 5 | ||
| 6 | 6 | import System | |
| 7 | - from Python.Test import ConversionTest, UnicodeString | ||
| 7 | + from Python.Test import ConversionTest, MethodResolutionInt, UnicodeString | ||
| 8 | 8 | from Python.Runtime import PyObjectConversions | |
| 9 | 9 | from Python.Runtime.Codecs import RawProxyEncoder | |
| 10 | 10 | ||
@@ -681,3 +681,15 @@ def CanEncode(self, clr_type): | |||
| 681 | 681 | l = ob.ListField | |
| 682 | 682 | l.Add(42) | |
| 683 | 683 | assert ob.ListField.Count == 1 | |
| 684 | + | ||
| 685 | + def test_int_param_resolution_required(): | ||
| 686 | + """Test resolution of `int` parameters when resolution is needed""" | ||
| 687 | + | ||
| 688 | + mri = MethodResolutionInt() | ||
| 689 | + data = list(mri.MethodA(0x1000, 10)) | ||
| 690 | + assert len(data) == 10 | ||
| 691 | + assert data[0] == 0 | ||
| 692 | + | ||
| 693 | + data = list(mri.MethodA(0x100000000, 10)) | ||
| 694 | + assert len(data) == 10 | ||
| 695 | + assert data[0] == 0 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments