File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -186,11 +186,14 @@ def test_calc_signature(self):
186
186
self .assertTrue (obj .was_long )
187
187
188
188
clz = autoclass ("org.jnius.SignatureTest$ShortOrLong" )
189
- obj = clz ( 0 ) # could be short or long
190
- # this isnt truly deterministic, the two possible methods are tied for score
189
+ # short and long would be tied, 0 could be short or long
190
+ obj = clz ( 0 , signature = "(S)V" ) # so lets tell it is a short
191
191
self .assertTrue (obj .was_short )
192
192
193
- obj = clz (sys .maxsize )
193
+ obj = clz (0 , signature = "(J)V" ) # lets tell it is a long
194
+ self .assertFalse (obj .was_short )
195
+
196
+ obj = clz (sys .maxsize ) # this should be a long
194
197
self .assertFalse (obj .was_short )
195
198
196
199
autoclass ("org.jnius.SignatureTest$ShortOnly" )(0 ) # this should work as short
You can’t perform that action at this time.
0 commit comments