mirror of https://github.com/kivy/pyjnius.git
Add test for getter names starting with "is"
This commit is contained in:
parent
62486974f5
commit
3a6e6a3471
|
@ -33,6 +33,8 @@ public class BasicsTest {
|
|||
throw new IllegalArgumentException("helloworld2", e);
|
||||
}
|
||||
}
|
||||
public boolean getDisabled() { return true; };
|
||||
public boolean isEnabled() { return !this.getDisabled(); };
|
||||
|
||||
static public boolean fieldStaticZ = true;
|
||||
static public byte fieldStaticB = 127;
|
||||
|
|
|
@ -71,6 +71,11 @@ class BasicsTest(unittest.TestCase):
|
|||
self.assertEquals(test.fieldB, 127)
|
||||
self.assertEquals(test2.fieldB, 10)
|
||||
|
||||
def test_instance_getter_naming(self):
|
||||
test = autoclass('org.jnius.BasicsTest')()
|
||||
self.assertEquals(test.disabled, True)
|
||||
self.assertEquals(test.enabled, False)
|
||||
|
||||
def test_instance_set_fields(self):
|
||||
test = autoclass('org.jnius.BasicsTest')()
|
||||
test.fieldSetZ = True
|
||||
|
|
Loading…
Reference in New Issue