Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: tests/StringTest.cpp

Issue 1317913005: whitelist fallback typefaces (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix unsigned mismatch Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/StringTest.cpp
diff --git a/tests/StringTest.cpp b/tests/StringTest.cpp
index 595a0b194a93fe963e1cc56ce3ed6253d2794b3f..1f0b5644b9e505ccb4f8782787f205bfbfbc8c1d 100644
--- a/tests/StringTest.cpp
+++ b/tests/StringTest.cpp
@@ -185,6 +185,13 @@ DEF_TEST(String, reporter) {
REPORTER_ASSERT(reporter, buffer[19] == 0);
REPORTER_ASSERT(reporter, buffer[20] == 'a');
+ SkString h("b");
+ for (int i = 2; i < 10; ++i) {
+ h.resize(i);
+ char* writeChar = h.writable_str() + i - 1;
+ *writeChar = (char) ('a' + i);
+ REPORTER_ASSERT(reporter, !strncmp("bcdefghijk", h.c_str(), i));
+ }
}
DEF_TEST(String_SkStrSplit, r) {

Powered by Google App Engine
This is Rietveld 408576698