diff options
author | 2015-02-13 18:30:11 -0800 | |
---|---|---|
committer | 2015-02-13 18:30:11 -0800 | |
commit | 3d47e2133cd089de9719d4626e51a7d259a887d7 (patch) | |
tree | 7b5245c2270d07ac3549e6ee1409b6af8e64b420 /tests/FontConfigParser.cpp | |
parent | 43466a1ade066f96823dbc7963767da3973afd91 (diff) |
Labels when dumping fonts in Android parser test.
When the FontConfigParserAndroid test runs, it optionally dumps the
configurations it creates for manual inspection. This is useful, but
since three different configurations exist, it can be difficult to tell
them apart. This simply prints a short header before each dump so that
the dump can be identified.
Review URL: https://codereview.chromium.org/927533004
Diffstat (limited to 'tests/FontConfigParser.cpp')
-rw-r--r-- | tests/FontConfigParser.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/FontConfigParser.cpp b/tests/FontConfigParser.cpp index 35cc4d098c..e58d35c625 100644 --- a/tests/FontConfigParser.cpp +++ b/tests/FontConfigParser.cpp @@ -63,11 +63,12 @@ void ValidateLoadedFonts(SkTDArray<FontFamily*> fontFamilies, const char* firstE } } -void DumpLoadedFonts(SkTDArray<FontFamily*> fontFamilies) { +void DumpLoadedFonts(SkTDArray<FontFamily*> fontFamilies, const char* label) { if (!FLAGS_verboseFontMgr) { return; } + SkDebugf("\n--- Dumping %s\n", label); for (int i = 0; i < fontFamilies.count(); ++i) { SkDebugf("Family %d:\n", i); switch(fontFamilies[i]->fVariant) { @@ -104,7 +105,7 @@ DEF_TEST(FontConfigParserAndroid, reporter) { REPORTER_ASSERT(reporter, preV17FontFamilies.count() == 14); REPORTER_ASSERT(reporter, CountFallbacks(preV17FontFamilies) == 10); - DumpLoadedFonts(preV17FontFamilies); + DumpLoadedFonts(preV17FontFamilies, "pre version 17"); ValidateLoadedFonts(preV17FontFamilies, "Roboto-Regular.ttf", reporter); } else { resourcesMissing = true; @@ -122,7 +123,7 @@ DEF_TEST(FontConfigParserAndroid, reporter) { REPORTER_ASSERT(reporter, v17FontFamilies.count() == 56); REPORTER_ASSERT(reporter, CountFallbacks(v17FontFamilies) == 46); - DumpLoadedFonts(v17FontFamilies); + DumpLoadedFonts(v17FontFamilies, "version 17"); ValidateLoadedFonts(v17FontFamilies, "Roboto-Regular.ttf", reporter); } else { resourcesMissing = true; @@ -139,7 +140,7 @@ DEF_TEST(FontConfigParserAndroid, reporter) { REPORTER_ASSERT(reporter, v22FontFamilies.count() == 53); REPORTER_ASSERT(reporter, CountFallbacks(v22FontFamilies) == 42); - DumpLoadedFonts(v22FontFamilies); + DumpLoadedFonts(v22FontFamilies, "version 22"); ValidateLoadedFonts(v22FontFamilies, "Roboto-Thin.ttf", reporter); } else { resourcesMissing = true; |