From 14975379cdeaec2b3a82fc4b0a040ec8bf732316 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Mon, 20 Apr 2026 17:40:31 +0200 Subject: [PATCH] Add wstring to test shims --- test/shims/WString.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/shims/WString.h diff --git a/test/shims/WString.h b/test/shims/WString.h new file mode 100644 index 00000000..f5d9eb4f --- /dev/null +++ b/test/shims/WString.h @@ -0,0 +1,19 @@ +#pragma once + +#include +#include + +// Minimal host-side stand-in for the Arduino framework's WString/String. +// Only provides the surface that header-only inline overloads in this repo +// touch (c_str/length). Host tests never construct a String. +class String { + public: + String() = default; + String(const char* s) : _buf(s ? s : "") {} + + const char* c_str() const { return _buf; } + size_t length() const { return std::strlen(_buf); } + + private: + const char* _buf = ""; +};