Damien George
04d5e644fc
py/objarray: Fix array.append so it doesn't extend if append fails.
Addresses issue #1965 .
9 years ago
Damien George
2c915e1ae6
py: Implement basic with support in native emitter.
9 years ago
Damien George
e1e7657277
py/formatfloat: Fix further cases of buffer overflow in formatting.
Includes extensive test cases to catch hopefully all cases where
buffer might overflow.
9 years ago
Paul Sokolovsky
88f60de914
tests: Add test for io.BufferedWriter.
9 years ago
Damien George
da161fd9f0
extmod/uctypes: Finish support for FLOAT32 and FLOAT64 types.
9 years ago
Damien George
99146ea444
tests/io: Remove "testfile" at end of open_plus test.
9 years ago
Damien George
664f03f466
tests: Add a test for argument passing to inline-asm functions.
9 years ago
Damien George
157056ecdf
tests: Add new subdir "stress/" specifically for stress tests.
9 years ago
Damien George
ab69ed7dac
tests: Split large tests into smaller files, to run with a small heap.
All tests in basics/ directory can now run and pass using 64-bit unix
port with only a 16k heap (./run-tests --heapsize 16k). Tests in this
directory should remain small so they can be used for ports with a
small heap.
9 years ago
Damien George
9996adc37d
tests/run-tests: Add cmd line option "--heapsize".
This allows you to specify the heapsize that unix will use when running
the test suite, eg: ./run-tests --heapsize 16k
9 years ago
Damien George
cea6cf8a5e
py/formatfloat: Fix buffer overflow when formatting tiny numbers.
9 years ago
Damien George
77f85db41e
py/objarray: Fix array slice assignment when array is reallocated.
Addresses issue #1898 .
9 years ago
Damien George
f0e2d13fd2
tests/run-tests: Simplify handling of newline in output from tests.
Now, all output has newlines converted to \n, regardless of port or
platform.
9 years ago
Damien George
d964873e56
tests/run-tests: Fix logic when selecting test-dirs for a given target.
9 years ago
Paul Sokolovsky
b86c20676e
tests/recursive_iternext.py: Make low-heap friendly.
9 years ago
Paul Sokolovsky
419bb26ddc
tests/print_exception: Use exception which prints the same regardless of config.
NameError may either include offending name or not. Unfortunately, this
change makes test float-dependent. And using integer division leads to
different error message than CPython.
9 years ago
Paul Sokolovsky
d973c1bc12
test/string_format_fp30: Variant of string_format for 30-bit stuffed float.
9 years ago
Paul Sokolovsky
50e0a7b9d4
test/float2int_fp30: Variant of float2int for 30-bit stuffed float.
9 years ago
Damien George
fbb3c190f9
tests: Remove commented out tests so test script is not too big.
9 years ago
Damien George
14848ffa12
tests: Reduce large object allocations so tests can run with small heap.
9 years ago
Paul Sokolovsky
2382d30318
tests/run-tests: Skips for esp8266.
9 years ago
Paul Sokolovsky
2740dd85f2
tests/vfs_fat_ramdisk: Add testcase for .rename().
9 years ago
Paul Sokolovsky
9fb36af9af
tests/vfs_fat_ramdisk: Allow to run in native mode (don't use "with").
9 years ago
Paul Sokolovsky
eaa96a7610
tests/vfs_fat_ramdisk: Add testcase for .mkdir().
9 years ago
Paul Sokolovsky
57425b648f
tests/vfs_fat_ramdisk: Add testcase for .remove().
9 years ago
Paul Sokolovsky
9c081b740b
tests/vfs_fat_ramdisk: Add .listdir() testcase.
9 years ago
danicampora
add930c4b5
cc3200: Rename 'server' class to 'Server' for consistency.
9 years ago
danicampora
cc7a4d7db2
tests/wipy: Correct machine test expected result.
9 years ago
danicampora
5148860332
tests: Skip uctypes and urandom tests not supported byt the WiPy.
9 years ago
danicampora
fe9620a2bd
test/wipy: Add Timer class tests.
9 years ago
Alex March
69d9e7d27d
py/repl: Check for an identifier char after the keyword.
- As described in the #1850 .
- Add cmdline tests.
9 years ago
Paul Sokolovsky
dfc35afba1
tests/vfs_fat_ramdisk: Skip test if can't allocate ramdisk.
9 years ago
Paul Sokolovsky
9fdac9144d
tests/vfs_fat_ramdisk: Allow to override sector size.
9 years ago
Paul Sokolovsky
9d0525182d
tests/vfs_fat_ramdisk: Switch to ioctl-based blockdev API.
9 years ago
Paul Sokolovsky
0ee1d0f407
tests/vfs_fat_ramdisk: Add test for VfsFat.
9 years ago
Paul Sokolovsky
e5cff5b223
tests/bytearray1: Add testcases for "in" operator.
9 years ago
Paul Sokolovsky
d4315a6caf
float/string_format: Split large test in 2.
9 years ago
Paul Sokolovsky
2850e7cd97
tests/run-tests: Add esp8266 target.
9 years ago
Paul Sokolovsky
dc587a3623
test/float2int: Make test output clearer.
9 years ago
Damien George
f7e5e677df
tests/pyb: Add simple test for stm module on pyboard.
9 years ago
Damien George
3e02b1d19a
py/viper: Allow casting of Python integers to viper pointers.
This allows you to pass a number (being an address) to a viper function
that expects a pointer, and also allows casting of integers to pointers
within viper functions.
This was actually the original behaviour, but it regressed due to native
type identifiers being promoted to 4 bits in width.
9 years ago
Paul Sokolovsky
5bf6eba845
tests/open_plus: Add tests for "r+", "w+" open modes.
9 years ago
Doug Currie
2e2e15cec2
py/mpz: Complete implementation of mpz_{and,or,xor} for negative args.
For these 3 bitwise operations there are now fast functions for
positive-only arguments, and general functions for arbitrary sign
arguments (the fast functions are the existing implementation).
By default the fast functions are not used (to save space) and instead
the general functions are used for all operations.
Enable MICROPY_OPT_MPZ_BITWISE to use the fast functions for positive
arguments.
9 years ago
pohmelie
e3a29de1dc
py/objstr: For str.format, add nested/computed fields support.
Eg: '{:{}}'.format(123, '>20')
@pohmelie was the original author of this patch, but @dpgeorge made
significant changes to reduce code size and improve efficiency.
9 years ago
Damien George
93bb7dffd2
py/vm: Fix popping of exception block in UNWIND_JUMP opcode.
Fixes issue #1812 .
9 years ago
Damien George
9e677114e4
py/mpprint: Fix sign extension when printf'ing %u, %x and %X.
9 years ago
Damien George
ef5f2669dc
tests: For pyboard, add test for I2C error handling and recovery.
9 years ago
Damien George
3cfb15cf4d
tests: Update pyboard LED test.
9 years ago
Damien George
8f54c08691
py/inlineasm: Add ability to specify return type of asm_thumb funcs.
Supported return types are: object, bool, int, uint.
For example:
@micropython.asm_thumb
def foo(r0, r1) -> uint:
add(r0, r0, r1)
9 years ago
Damien George
ac11e89fa3
tests: For urandom test, use sys.exit() instead of sys.exit(1).
9 years ago