Commit Graph

207 Commits (jebbatime)

Author SHA1 Message Date
Damien George da161fd9f0 extmod/uctypes: Finish support for FLOAT32 and FLOAT64 types. 2016-03-19 21:59:42 +00:00
Paul Sokolovsky 2740dd85f2 tests/vfs_fat_ramdisk: Add testcase for .rename(). 2016-02-29 01:24:18 +02:00
Paul Sokolovsky 9fb36af9af tests/vfs_fat_ramdisk: Allow to run in native mode (don't use "with"). 2016-02-29 01:03:32 +02:00
Paul Sokolovsky eaa96a7610 tests/vfs_fat_ramdisk: Add testcase for .mkdir(). 2016-02-29 00:06:44 +02:00
Paul Sokolovsky 57425b648f tests/vfs_fat_ramdisk: Add testcase for .remove(). 2016-02-28 20:30:59 +02:00
Paul Sokolovsky 9c081b740b tests/vfs_fat_ramdisk: Add .listdir() testcase. 2016-02-28 17:19:12 +02:00
Paul Sokolovsky dfc35afba1 tests/vfs_fat_ramdisk: Skip test if can't allocate ramdisk. 2016-02-15 17:27:57 +02:00
Paul Sokolovsky 9fdac9144d tests/vfs_fat_ramdisk: Allow to override sector size. 2016-02-14 20:52:38 +02:00
Paul Sokolovsky 9d0525182d tests/vfs_fat_ramdisk: Switch to ioctl-based blockdev API. 2016-02-14 20:45:08 +02:00
Paul Sokolovsky 0ee1d0f407 tests/vfs_fat_ramdisk: Add test for VfsFat. 2016-02-14 19:15:22 +02:00
Damien George ac11e89fa3 tests: For urandom test, use sys.exit() instead of sys.exit(1). 2016-01-26 21:57:02 +00:00
Damien George 0ae97f531d tests: Add some tests for urandom module. 2016-01-26 15:27:00 +00:00
Dave Hylands 66d0c1052a extmod: Fix uctypes size calculation for bitfields 2016-01-10 23:31:26 +02:00
Antonin ENFRUN b50030b1d0 tests/uctypes: Test item assignment for scalar arrays. 2016-01-03 20:32:51 +02:00
Dave Hylands 5a4a2b1db3 extmod: Add test which demonstrates LITTLE_ENDIAN packing failure 2015-12-09 21:43:28 +02:00
Paul Sokolovsky aee704ebe1 extmod/modure: Make sure that errors in regexps are caught early. 2015-11-01 00:38:22 +03:00
Paul Sokolovsky acea9352a9 tests/extmod: Add tests for sleep_ms/us(), ticks_ms/us/diff().
Simple smoke tests, mostly for coverage. Added to extmod based on the fact
that they're extensions to standard modules.
2015-10-20 01:54:20 +03:00
Damien George 25afc7da0d tests: Add tests to improve coverage of objstr.c. 2015-09-03 23:06:18 +01:00
Paul Sokolovsky 354d17523f modmachine: Implement physical memory access using /dev/mem (Linux, etc).
This requires root access. And on recent Linux kernels, with
CONFIG_STRICT_DEVMEM option enabled, only address ranges listed in
/proc/iomem can be accessed. The above compiled-time option can be
however overriden with boot-time option "iomem=relaxed".

This also removed separate read/write paths - there unlikely would
be a case when they're different.
2015-07-08 11:37:23 +03:00
Damien George 68e8b595de tests: Catch ValueError instead of any exception to properly test error. 2015-07-06 11:35:08 +00:00
Galen Hazelwood 616986a5f3 extmod: Add a2b_base64 and b2a_base64 functions to ubinascii. 2015-07-04 12:26:52 +03:00
Damien George e44c1d3ace tests: Split out json float tests to separate files. 2015-06-25 10:50:00 +01:00
Damien George f6518a7bd5 tests: Check that machine module exists and print SKIP if it doesn't. 2015-06-15 23:35:15 +01:00
Paul Sokolovsky 1679696612 moductypes: Swap address and descriptor args in constructor.
Now address comes first, and args related to struct type are groupped next.
Besides clear groupping, should help catch errors eagerly (e.g. forgetting
to pass address will error out).

Also, improve args number checking/reporting overall.
2015-06-06 22:57:54 +03:00
Dave Hylands 3ad94d6072 extmod: Add ubinascii.unhexlify
This also pulls out hex_digit from py/lexer.c and makes unichar_hex_digit
2015-05-20 09:29:22 +01:00
Damien George 0589c19d52 tests: Add test for machine module (mem* functions). 2015-05-08 00:18:28 +01:00
Damien George e5c4362a98 tests: Add some more tests to improve code coverage of corner cases. 2015-04-05 00:03:43 +01:00
Damien George f256cfef4f tests: Add some more tests for complex numbers and ure module. 2015-03-14 22:56:02 +00:00
Damien George 26a9975fba tests: Add some more tests for bytes, bignum, string and ujson. 2015-03-14 21:20:58 +00:00
Damien George c832bde05f tests: Add zlib test for decompressing uncompressed data. 2015-03-12 00:17:04 +00:00
Damien George 55278dcc76 tests: Add test for modure when regex has errors. 2015-03-10 17:47:43 +00:00
Damien George 6cb6947b99 extmod/ure: Correctly return None when a group has no match.
See issue #1122.
2015-03-04 13:51:32 +00:00
Damien George 2af921fb51 tests: Add tests for op special meths, ubinascii, complex. 2015-03-02 12:47:44 +00:00
Damien George 4e3906d6b5 tests: Add tests for ure groups and named char classes.
Issue #1122 should now be fixed.
2015-02-21 10:39:41 +00:00
Damien George 5f64dc55d8 extmod: Make ujson.loads raise exception if given empty string.
Addresses issue #1097.
2015-02-02 21:52:19 +00:00
Paul Sokolovsky 2324f3ef29 moduzlib: Implement raw DEFLATE decoding support. 2015-01-28 02:21:49 +02:00
Paul Sokolovsky 444331c07f modujson: .loads(): Handle more whitespace characters. 2015-01-23 18:41:29 +02:00
Paul Sokolovsky c8b0229bc7 tests: sha256: skip test if uhashlib module is not available. 2014-12-18 00:32:15 +02:00
Paul Sokolovsky 4a1c80c293 tests: Add test for hashlib.sha256 . 2014-11-22 14:54:02 +02:00
Paul Sokolovsky 66d08eb4fe moductypes: Add test for accessing UINT8 array. 2014-10-30 03:50:37 +02:00
Paul Sokolovsky 2559e13957 moductypes: Make sure we can apply .sizeof() to all aggregate types.
Before, sizeof() could be applied to a structure field only if that field
was itself a structure. Now it can be applied to PTR and ARRAY fields too.
It's not possible to apply it to scalar fields though, because as soon as
scalar field (int or float) is dereferenced, its value is converted into
Python int/float value, and all original type info is lost. Moreover, we
allow sizeof of type definitions too, and there int is used to represent
(scalar) types. So, we have ambiguity what int may be - either dereferenced
scalar structure field, or encoded scalar type. So, rather throw an error
if user tries to apply sizeof() to int.
2014-10-30 03:50:23 +02:00
Damien George f5d69794a8 extmod: Add uheapq module. 2014-10-22 23:20:15 +01:00
Paul Sokolovsky 297d8469b8 modure: Update to re1.5 v0.6.1, fixed and extended character class support. 2014-10-17 22:25:18 +03:00
Paul Sokolovsky 95908b0f50 modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]). 2014-10-15 04:44:07 +03:00
Paul Sokolovsky 34162872b1 moduzlib: Integrate into the system. 2014-10-13 00:07:44 +03:00
Paul Sokolovsky f7bcce0552 modure: Basic tests. 2014-10-11 14:36:33 +03:00
Paul Sokolovsky 9aeec0e3a3 tests: Add missing "import sys". 2014-10-06 22:30:46 +03:00
Damien George f53c343363 tests: Force skip of LE test on non-LE arch; improve run-tests-exp.sh. 2014-10-06 17:35:46 +00:00
Damien George c3ab90da46 tests: Make printing of floats hopefully more portable. 2014-10-05 17:50:02 +01:00
Damien George cde0ca21bf py: Simplify JSON str printing (while still conforming to JSON spec).
The JSON specs are relatively flexible and allow us to use one function
to print strings, be they ascii, bytes or utf-8 encoded.
2014-09-25 17:35:56 +01:00
Damien George 96e20c600f tests: Fix uctypes tests to run on 64bit arch; enable more native tests. 2014-09-23 14:15:45 +00:00
Damien George 2c180f7ccc extmod, ujson: Add test and comment for loads. 2014-09-21 23:43:03 +01:00
Damien George 612045f53f py: Add native json printing using existing print framework.
Also add start of ujson module with dumps implemented.  Enabled in unix
and stmhal ports.  Test passes on both.
2014-09-17 22:56:34 +01:00
Damien George 1ddd844815 extmod: Finish rename of zlib to zlibd; enable zlibd on stmhal. 2014-08-12 23:23:53 +01:00
Paul Sokolovsky 5073d3da07 tests: Add test for zlibd module. 2014-08-13 00:26:26 +03:00
Paul Sokolovsky 2097c8b1e1 moductypes: Add symbolic constants to specify bitfield position/length. 2014-07-11 00:06:36 +03:00
Paul Sokolovsky 8215847b4d moductypes: Foreign data interface module, roughly based on ctype ideas.
But much smaller and memory-efficient. Uses Python builtin data structures
(dict, tuple, int) to describe structure layout.
2014-07-09 19:28:24 +03:00