Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uPython-mirror
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
uPython-mirror
Commits
5a4a2b1d
Commit
5a4a2b1d
authored
Dec 09, 2015
by
Dave Hylands
Committed by
Paul Sokolovsky
Dec 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extmod: Add test which demonstrates LITTLE_ENDIAN packing failure
parent
e84325bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
tests/extmod/uctypes_sizeof.py
tests/extmod/uctypes_sizeof.py
+5
-0
tests/extmod/uctypes_sizeof.py.exp
tests/extmod/uctypes_sizeof.py.exp
+1
-0
No files found.
tests/extmod/uctypes_sizeof.py
View file @
5a4a2b1d
...
...
@@ -6,6 +6,7 @@ desc = {
# arr2 is array at offset 0, size 2, of structures defined recursively
"arr2"
:
(
uctypes
.
ARRAY
|
0
,
2
,
{
"b"
:
uctypes
.
UINT8
|
0
}),
"arr3"
:
(
uctypes
.
ARRAY
|
2
,
uctypes
.
UINT16
|
2
),
"arr4"
:
(
uctypes
.
ARRAY
|
0
,
2
,
{
"b"
:
uctypes
.
UINT8
|
0
,
"w"
:
uctypes
.
UINT16
|
1
})
}
data
=
bytearray
(
b"01234567"
)
...
...
@@ -24,3 +25,7 @@ try:
print
(
uctypes
.
sizeof
(
S
.
arr3
[
0
]))
except
TypeError
:
print
(
"TypeError"
)
print
(
uctypes
.
sizeof
(
S
.
arr4
))
assert
uctypes
.
sizeof
(
S
.
arr4
)
==
6
tests/extmod/uctypes_sizeof.py.exp
View file @
5a4a2b1d
...
...
@@ -2,3 +2,4 @@
2
4
TypeError
6
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment