1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Add explicit Print::write(char) (#6101)

W/o this change, file::write('a'); tries to use the template and fails
since char is a basic type.

The reason it is needed is due to pre 2.5.x behavior, File::write(char)
silently was cast to File::write(uint8_t).  With the template write,
though, this is not performed.

* Add Print::write tests and add'l overrides

Ensure that print::write does something sane and doesn't cause a compile
time error about templates when used for Files.

Test using SPIFFS file since Print is an abstract type.
This commit is contained in:
Earle F. Philhower, III
2019-05-18 14:07:13 -07:00
committed by GitHub
parent 48fc8aff20
commit 82adc95d64
4 changed files with 91 additions and 11 deletions

View File

@ -127,7 +127,8 @@ TEST_CPP_FILES := \
core/test_pgmspace.cpp \
core/test_md5builder.cpp \
core/test_string.cpp \
core/test_PolledTimeout.cpp
core/test_PolledTimeout.cpp \
core/test_Print.cpp
PREINCLUDES := \
-include common/mock.h \