Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
ec72db8a
Commit
ec72db8a
authored
8 years ago
by
Rami Ali
Committed by
Damien George
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
tests: Improve warning.c test coverage.
parent
26f00ff1
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/unix/extra_coverage.py.exp
+1
-0
1 addition, 0 deletions
tests/unix/extra_coverage.py.exp
unix/coverage.c
+6
-0
6 additions, 0 deletions
unix/coverage.c
with
7 additions
and
0 deletions
tests/unix/extra_coverage.py.exp
+
1
−
0
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
...
...
This diff is collapsed.
Click to expand it.
unix/coverage.c
+
6
−
0
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment