summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-03 11:31:27 -0600
committerSimon Glass <sjg@chromium.org>2020-10-29 14:42:17 -0600
commite144cafe43c8298bd41c044329857c3068cd845b (patch)
tree0c671dc9826b0ca6569294c438597fcc89f78039 /test
parentabb9cd30b23858125ce015c1dffdae4d7895bae8 (diff)
dtoc: Fix widening of int to bytes
At present an integer is converted to bytes incorrectly. The whole 32-bit integer is inserted as the first element of the byte array, and the other three bytes are skipped. This was not noticed because the unit test did not check it, and the functional test was checking for wrong values. Update the code to handle this as a special case. Add one more test to cover all code paths. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_ofplatdata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/tests/test_ofplatdata.py b/test/py/tests/test_ofplatdata.py
index 263334b074..13154935b9 100644
--- a/test/py/tests/test_ofplatdata.py
+++ b/test/py/tests/test_ofplatdata.py
@@ -20,7 +20,7 @@ byte 08
bytearray 01 23 34
int 3
intarray 5 0 0 0
-longbytearray 09 00 00 00 00 00 00 00 00
+longbytearray 09 0a 0b 0c 00 00 00 00 00
string message2
stringarray "another" "multi-word" "message"
of-platdata probe: