Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
ec72db8a
Commit
ec72db8a
authored
Jan 04, 2017
by
Rami Ali
Committed by
Damien George
Jan 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: Improve warning.c test coverage.
parent
26f00ff1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
tests/unix/extra_coverage.py.exp
tests/unix/extra_coverage.py.exp
+1
-0
unix/coverage.c
unix/coverage.c
+6
-0
No files found.
tests/unix/extra_coverage.py.exp
View file @
ec72db8a
...
...
@@ -38,6 +38,7 @@ ementation
# runtime utils
TypeError: can't convert str to int
TypeError: unsupported types for : 'str', 'str'
Warning: test
('0123456789', b'0123456789')
7300
7300
...
...
unix/coverage.c
View file @
ec72db8a
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment