Skip to content

Commit d2517f1

Browse files
committed
tests/micropython/viper: Boundary value tests depend on arbitrary ints.
Skip the tests if MicroPython can't represent >64-bit integers (these tests repeatedly left shift values by 8 bits). It would be possible to have these tests work in this case I think, as the results are always masked to shorter values. But quite fiddly. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
1 parent fc57e80 commit d2517f1

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

tests/micropython/viper_ptr16_store_boundary.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Test boundary conditions for various architectures
22

3+
try:
4+
int("0x10000000000000000", 16)
5+
except:
6+
print("SKIP") # No support for >64-bit integers
7+
raise SystemExit
8+
39
SET_TEMPLATE = """
410
@micropython.viper
511
def set{off}(dest: ptr16):

tests/micropython/viper_ptr32_store_boundary.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Test boundary conditions for various architectures
22

3+
try:
4+
int("0x10000000000000000", 16)
5+
except:
6+
print("SKIP") # No support for >64-bit integers
7+
raise SystemExit
8+
39
SET_TEMPLATE = """
410
@micropython.viper
511
def set{off}(dest: ptr32):

tests/micropython/viper_ptr8_store_boundary.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Test boundary conditions for various architectures
22

3+
try:
4+
int("0x10000000000000000", 16)
5+
except:
6+
print("SKIP") # No support for >64-bit integers
7+
raise SystemExit
8+
39
SET_TEMPLATE = """
410
@micropython.viper
511
def set{off}(dest: ptr8):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy