You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
tests/basics/list_slice_3arg: Add more tests for negative slicing.
This commit is contained in:
@@ -26,3 +26,14 @@ print(x[-1:-1:-1])
|
||||
print(x[-1:-2:-1])
|
||||
print(x[-1:-11:-1])
|
||||
print(x[-10:-11:-1])
|
||||
print(x[:-15:-1])
|
||||
|
||||
# test negative indices that are out-of-bounds
|
||||
print([][::-1])
|
||||
print([1][::-1])
|
||||
print([][0:-10:-1])
|
||||
print([1][0:-10:-1])
|
||||
print([][:-20:-1])
|
||||
print([1][:-20:-1])
|
||||
print([][-20::-1])
|
||||
print([1][-20::-1])
|
||||
|
||||
Reference in New Issue
Block a user