Added tests for Flash strings (closes #1070)

This commit is contained in:
Benoit Blanchon
2019-08-11 10:47:19 +02:00
parent 63d7d87080
commit 0d339300f9
6 changed files with 104 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ class FlashStringAdapter {
if (!other && !_str) return 0;
if (!_str) return -1;
if (!other) return 1;
return -strcmp_P(other, reinterpret_cast<const char*>(_str));
return int8_t(-strcmp_P(other, reinterpret_cast<const char*>(_str)));
}
bool equals(const char* expected) const {