- Update Status::CODE style to Status::Code() using
pw_status/update_style.py.
- Make minor adjustments to the pw_assert tests to get them passing.
Change-Id: Ie54c3c605178fd1e42c7cedbcff324115f3ed279
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/19165
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
- Update pw_string and the test framework to std::span.
- Have pw_string pass std::span by value, for consistency with other
uses in Pigweed.
- Recommend using template specializations instead of overloads for
custom ToString implementations. Template specializations are
preferred because the main ToString definition is a template.
Change-Id: Ib67c6bce1752c4a90e2138bdb1f20c6671f55d50
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12841
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
Remove a test that attempts to trigger a negative (error) return value
for snprintf. The format strings that trigger these errors vary by
platform, and a format that returns a negative result on one platform
(Linux) may crash another (Windows).
Change-Id: I7b60bc301cd534d0e78228829ea6288687e05c43
On Windows, sometimes the va_list overload would be used when formatting
with a single argument. To avoid potential conflicts like these, the
va_list versions of string::Format and StringBuilder::Format are renamed
to FormatVaList.
Change-Id: Id29fae21b13ed420b13841a479e3748a1d3b91ce
This change configures the Windows host target for GN. It should allow
building unit tests for the host.
Change-Id: Ib92c9a83b9b858a9b7ed55487199c63896580af1
snprintf should return a negative number if there is a formatting error.
Limited snprintf implementations may not detect these errors. This
caused the test to fail on the STM32 Discovery F429i.
Change-Id: I1da8593c258508c0d3e2fa6c440a58493ce15597
Provide a string::Format function that writes to a span. The snprintf
return value is interpreted and returned as a StatusWithSize.
Change-Id: Ib7fed684dc333d5feaef85c1bb558cb45e3936bd