diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-19 11:17:54 -0600 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-08-21 10:00:44 +1000 |
commit | 50e5cd07f325d4eca2d3f495560077b2ca1f30b6 (patch) | |
tree | 883d49a1a93235cc96c3d3d2377c21b3c2e6b3af | |
parent | ab78860f09f5817d5ad7fe3d55d4dad861b75c24 (diff) | |
download | device-tree-compiler-50e5cd07f325d4eca2d3f495560077b2ca1f30b6.tar.gz |
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>
-rw-r--r-- | tests/pylibfdt_tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/pylibfdt_tests.py b/tests/pylibfdt_tests.py index ae392bb..e8a4582 100644 --- a/tests/pylibfdt_tests.py +++ b/tests/pylibfdt_tests.py @@ -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() |