Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ports/esp8266/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
#define MICROPY_PY_OS_URANDOM (1)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
#define MICROPY_FLOAT_FORMAT_IMPL (MICROPY_FLOAT_FORMAT_IMPL_BASIC)
#define MICROPY_WARNINGS (1)
#define MICROPY_PY_STR_BYTES_CMP_WARN (1)
#define MICROPY_STREAMS_POSIX_API (1)
Expand Down
20 changes: 0 additions & 20 deletions ports/unix/coverage.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,26 +612,6 @@ static mp_obj_t extra_coverage(void) {
mp_emitter_warning(MP_PASS_CODE_SIZE, "test");
}

// format float
{
mp_printf(&mp_plat_print, "# format float\n");

// format with inadequate buffer size
char buf[5];
mp_format_float(1, buf, sizeof(buf), 'g', 0, '+');
mp_printf(&mp_plat_print, "%s\n", buf);

// format with just enough buffer so that precision must be
// set from 0 to 1 twice
char buf2[8];
mp_format_float(1, buf2, sizeof(buf2), 'g', 0, '+');
mp_printf(&mp_plat_print, "%s\n", buf2);

// format where precision is trimmed to avoid buffer overflow
mp_format_float(1, buf2, sizeof(buf2), 'e', 0, '+');
mp_printf(&mp_plat_print, "%s\n", buf2);
}

// binary
{
mp_printf(&mp_plat_print, "# binary\n");
Expand Down
Loading
Loading