diff options
| author | Damien George | 2016-10-07 12:57:25 +1100 |
|---|---|---|
| committer | Damien George | 2016-10-07 12:57:25 +1100 |
| commit | 82af4d6749072d01195da647f54b79c80f1ad731 (patch) | |
| tree | cc3d607cb93264b1d0c06dd939e7d03cad660443 /tests/misc | |
| parent | dffa383b062b0dd788abed0af242b66bde910e6b (diff) | |
tests: Improve coverage of struct with test for non-compliant behaviour.
Diffstat (limited to 'tests/misc')
| -rw-r--r-- | tests/misc/non_compliant.py | 7 | ||||
| -rw-r--r-- | tests/misc/non_compliant.py.exp | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/misc/non_compliant.py b/tests/misc/non_compliant.py index ba2dd15c6..1157ff8b2 100644 --- a/tests/misc/non_compliant.py +++ b/tests/misc/non_compliant.py @@ -1,6 +1,7 @@ # tests for things that are not implemented, or have non-compliant behaviour import array +import ustruct # array deletion not implemented try: @@ -87,3 +88,9 @@ try: del [][2:3:4] except NotImplementedError: print('NotImplementedError') + +# struct pack with too many args, not checked by uPy +print(ustruct.pack('bb', 1, 2, 3)) + +# struct pack with too few args, not checked by uPy +print(ustruct.pack('bb', 1)) diff --git a/tests/misc/non_compliant.py.exp b/tests/misc/non_compliant.py.exp index 5937ccb2f..c03580442 100644 --- a/tests/misc/non_compliant.py.exp +++ b/tests/misc/non_compliant.py.exp @@ -12,3 +12,5 @@ NotImplementedError NotImplementedError NotImplementedError NotImplementedError +b'\x01\x02' +b'\x01\x00' |
