add tests for testing Python string -> [B, using ByteBuffer.wrap(byte[])

This commit is contained in:
Mathieu Virbel 2013-06-24 09:24:37 +02:00
parent 5ec6d80ba3
commit 68165ed04b
1 changed files with 9 additions and 0 deletions

9
tests/test_bytearray.py Normal file
View File

@ -0,0 +1,9 @@
import unittest
from jnius import autoclass
class StringArgumentForByteArrayTest(unittest.TestCase):
def test_string_arg_for_byte_array(self):
# the ByteBuffer.wrap() accept only byte[].
ByteBuffer = autoclass('java.nio.ByteBuffer')
self.assertIsNotNone(ByteBuffer.wrap('hello world'))