pylibfdt: Add a test for use of uint32_t
Using the libfdt function without going through the Python Fdt class requires use of the uint32_t type. Add a test that this works correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
ab78860f09
commit
50e5cd07f3
1 changed files with 5 additions and 0 deletions
|
@ -283,6 +283,11 @@ class PyLibfdtTests(unittest.TestCase):
|
|||
self.assertEquals(-libfdt.BADPATH,
|
||||
self.fdt.path_offset('missing', QUIET_ALL))
|
||||
|
||||
def testIntegers(self):
|
||||
"""Check that integers can be passed and returned"""
|
||||
self.assertEquals(0, libfdt.fdt_get_phandle(self.fdt._fdt, 0))
|
||||
node2 = self.fdt.path_offset('/subnode@2')
|
||||
self.assertEquals(0x2000, libfdt.fdt_get_phandle(self.fdt._fdt, node2))
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in a new issue