From 9dd20611fe354a46e21f7d0627882c09dc963708 Mon Sep 17 00:00:00 2001 From: tshirtman Date: Thu, 17 Jan 2013 02:33:50 +0100 Subject: [PATCH] small fixes --- tests/test_proxy.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_proxy.py b/tests/test_proxy.py index 842810f..c0d1cc8 100644 --- a/tests/test_proxy.py +++ b/tests/test_proxy.py @@ -15,7 +15,8 @@ class TestImplemIterator(PythonJavaClass): @java_implementation('()Z') def hasNext(self): - return self.index < len(self.collection.data) + print "hasNext", self.index + return self.index < len(self.collection.data) - 1 @java_implementation('()Ljava/lang/Object;') def next(self): @@ -47,8 +48,9 @@ class TestImplemIterator(PythonJavaClass): return self.collection.data[index] @java_implementation('(Ljava/lang/Object;)V') - def set(self, index, obj): - self.data[index] = obj + def set(self, obj): + print self.index, len(self.collection.data) + self.collection.data[self.index] = obj class TestImplem(PythonJavaClass): @@ -125,7 +127,7 @@ print "rotate" print Collections.rotate(a, 5) print a.data -# if this test is commented, the next one fail… +# if this test is commented, the next one fail. print 'tries to get a ListIterator' print a.listIterator()