summaryrefslogtreecommitdiffstatshomepage
path: root/unix/coverage.c
diff options
context:
space:
mode:
authorRami Ali <flowergrass@users.noreply.github.com>2017-01-04 14:23:29 +1100
committerDamien George <damien.p.george@gmail.com>2017-01-05 12:23:40 +1100
commitec72db8a398f82fb694dc01c7081232286e72c3f (patch)
tree1104e25edde0d626a1cfb2c56a26a15e04b37892 /unix/coverage.c
parent26f00ff154e68f623bd312a78f92051fea2f6d4e (diff)
downloadmicropython-ec72db8a398f82fb694dc01c7081232286e72c3f.tar.gz
micropython-ec72db8a398f82fb694dc01c7081232286e72c3f.zip
tests: Improve warning.c test coverage.
Diffstat (limited to 'unix/coverage.c')
-rw-r--r--unix/coverage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/unix/coverage.c b/unix/coverage.c
index 2abfc870f3..033f09ed30 100644
--- a/unix/coverage.c
+++ b/unix/coverage.c
@@ -6,6 +6,7 @@
#include "py/repl.h"
#include "py/mpz.h"
#include "py/builtin.h"
+#include "py/emit.h"
#if defined(MICROPY_UNIX_COVERAGE)
@@ -130,6 +131,11 @@ STATIC mp_obj_t extra_coverage(void) {
mp_call_function_2_protected(MP_OBJ_FROM_PTR(&mp_builtin_divmod_obj), mp_obj_new_str("abc", 3, false), mp_obj_new_str("abc", 3, false));
}
+ // warning
+ {
+ mp_emitter_warning(MP_PASS_CODE_SIZE, "test");
+ }
+
// return a tuple of data for testing on the Python side
mp_obj_t items[] = {(mp_obj_t)&str_no_hash_obj, (mp_obj_t)&bytes_no_hash_obj};
return mp_obj_new_tuple(MP_ARRAY_SIZE(items), items);