Lines Matching refs:prop
43 prop = node.props[prop_name]
46 offset = prop.GetOffset() + 12
47 data = dtb.GetContents()[offset:offset + len(prop.value)]
48 return prop, [chr(x) for x in data]
157 prop, value = _GetPropertyValue(self.dtb, self.node, 'longbytearray')
158 self.assertEqual(prop.value, value)
198 prop = node.props['clocks']
200 self.assertEqual(target, dtb.LookupPhandle(fdt32_to_cpu(prop.value)))
225 prop = node.props['clocks']
226 self.assertTrue(fdt32_to_cpu(prop.value) > 0)
241 prop = self._ConvertProp('boolval')
242 self.assertEqual(fdt.TYPE_BOOL, prop.type)
243 self.assertEqual(True, prop.value)
245 prop = self._ConvertProp('intval')
246 self.assertEqual(fdt.TYPE_INT, prop.type)
247 self.assertEqual(1, fdt32_to_cpu(prop.value))
249 prop = self._ConvertProp('intarray')
250 self.assertEqual(fdt.TYPE_INT, prop.type)
251 val = [fdt32_to_cpu(val) for val in prop.value]
254 prop = self._ConvertProp('byteval')
255 self.assertEqual(fdt.TYPE_BYTE, prop.type)
256 self.assertEqual(5, ord(prop.value))
258 prop = self._ConvertProp('longbytearray')
259 self.assertEqual(fdt.TYPE_BYTE, prop.type)
260 val = [ord(val) for val in prop.value]
263 prop = self._ConvertProp('stringval')
264 self.assertEqual(fdt.TYPE_STRING, prop.type)
265 self.assertEqual('message', prop.value)
267 prop = self._ConvertProp('stringarray')
268 self.assertEqual(fdt.TYPE_STRING, prop.type)
269 self.assertEqual(['multi-word', 'message'], prop.value)
271 prop = self._ConvertProp('notstring')
272 self.assertEqual(fdt.TYPE_BYTE, prop.type)
273 val = [ord(val) for val in prop.value]
285 prop, value = _GetPropertyValue(self.dtb, self.node, 'longbytearray')
286 self.assertEqual(prop.value, value)
291 prop = self.node.props['intval']
295 prop.Widen(prop2)
296 self.assertEqual(fdt.TYPE_INT, prop.type)
297 self.assertEqual(1, fdt32_to_cpu(prop.value))
301 prop.Widen(prop2)
302 self.assertEqual(fdt.TYPE_INT, prop.type)
303 self.assertTrue(isinstance(prop.value, list))
307 prop = self.node.props['longbytearray']
311 prop2.Widen(prop)
316 prop = self.node.props['stringval']
318 self.assertFalse(isinstance(prop.value, list))
319 self.assertEqual(7, len(prop.value))
320 prop.Widen(prop2)
321 self.assertTrue(isinstance(prop.value, list))
322 self.assertEqual(3, len(prop.value))
325 prop = self.node.props['stringarray']
327 self.assertTrue(isinstance(prop.value, list))
328 self.assertEqual(2, len(prop.value))
329 prop.Widen(prop2)
330 self.assertTrue(isinstance(prop.value, list))
331 self.assertEqual(3, len(prop.value))
393 prop = self.node.props['string']
394 prop.SetData(val)
401 prop = self.node.props['empty']
402 prop.SetData(val)
408 self.assertEqual('123', prop.bytes)