skia2/experimental/sktext
John Stiles 2122f40c4b Update REPORTER_ASSERT/ERRORF to check format strings.
Previously, REPORTER_ASSERT/ERRORF relied on a helper function named
`reporter_string` which papered over zero-argument and one-argument
messages (where one-argument messages are assumed to ignore printf
formatting rules entirely, and just forward the message as-is).

Replacing this helper with a direct call to `SkStringPrintf` allows
the compiler to check format arguments for correctness, but sacrifices
the one-argument special case. In practice the one-argument special
case was very rarely used, so it's not a significant sacrifice,
and this did uncover several real errors in assertion format strings
(including some cases where the wrong number of arguments was passed).

Change-Id: I4378c43b16fd8fdbf4c78d849a9f2f0a254f7abc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506617
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-02-10 16:37:05 +00:00
..
editor RTL 2021-10-22 16:21:02 +00:00
include RTL 2021-10-22 16:21:02 +00:00
samples RTL 2021-10-22 16:21:02 +00:00
src RTL 2021-10-22 16:21:02 +00:00
tests Update REPORTER_ASSERT/ERRORF to check format strings. 2022-02-10 16:37:05 +00:00
BUILD.gn Font resolution just started 2021-09-27 16:25:50 +00:00
sktext.gni Reland "The very first version of a new SkText API." 2021-09-15 21:39:56 +00:00