Index: tests/FontConfigParser.cpp |
diff --git a/tests/FontConfigParser.cpp b/tests/FontConfigParser.cpp |
index 73e9d2bf65e07bae7fc81aeec6f31ff58a68884d..1c32704938d69ab723b204d28673537108cb9dff 100644 |
--- a/tests/FontConfigParser.cpp |
+++ b/tests/FontConfigParser.cpp |
@@ -50,15 +50,21 @@ void DumpLoadedFonts(SkTDArray<FontFamily*> fontFamilies) { |
DEF_TEST(FontConfigParserAndroid, reporter) { |
+ bool resourcesMissing = false; |
+ |
SkTDArray<FontFamily*> preV17FontFamilies; |
SkFontConfigParser::GetTestFontFamilies(preV17FontFamilies, |
GetResourcePath("android_fonts/pre_v17/system_fonts.xml").c_str(), |
GetResourcePath("android_fonts/pre_v17/fallback_fonts.xml").c_str()); |
- REPORTER_ASSERT(reporter, preV17FontFamilies.count() == 14); |
+ if (preV17FontFamilies.count() > 0) { |
+ REPORTER_ASSERT(reporter, preV17FontFamilies.count() == 14); |
- DumpLoadedFonts(preV17FontFamilies); |
- ValidateLoadedFonts(preV17FontFamilies, reporter); |
+ DumpLoadedFonts(preV17FontFamilies); |
+ ValidateLoadedFonts(preV17FontFamilies, reporter); |
+ } else { |
+ resourcesMissing = true; |
+ } |
SkTDArray<FontFamily*> v17FontFamilies; |
@@ -66,10 +72,14 @@ DEF_TEST(FontConfigParserAndroid, reporter) { |
GetResourcePath("android_fonts/v17/system_fonts.xml").c_str(), |
GetResourcePath("android_fonts/v17/fallback_fonts.xml").c_str()); |
- REPORTER_ASSERT(reporter, v17FontFamilies.count() == 41); |
+ if (v17FontFamilies.count() > 0) { |
+ REPORTER_ASSERT(reporter, v17FontFamilies.count() == 41); |
- DumpLoadedFonts(v17FontFamilies); |
- ValidateLoadedFonts(v17FontFamilies, reporter); |
+ DumpLoadedFonts(v17FontFamilies); |
+ ValidateLoadedFonts(v17FontFamilies, reporter); |
+ } else { |
+ resourcesMissing = true; |
+ } |
SkTDArray<FontFamily*> v22FontFamilies; |
@@ -77,9 +87,17 @@ DEF_TEST(FontConfigParserAndroid, reporter) { |
GetResourcePath("android_fonts/v22/fonts.xml").c_str(), |
NULL); |
- REPORTER_ASSERT(reporter, v22FontFamilies.count() == 53); |
+ if (v22FontFamilies.count() > 0) { |
+ REPORTER_ASSERT(reporter, v22FontFamilies.count() == 53); |
- DumpLoadedFonts(v22FontFamilies); |
- ValidateLoadedFonts(v22FontFamilies, reporter); |
+ DumpLoadedFonts(v22FontFamilies); |
+ ValidateLoadedFonts(v22FontFamilies, reporter); |
+ } else { |
+ resourcesMissing = true; |
+ } |
+ |
+ if (resourcesMissing) { |
+ SkDebugf("---- Resource files missing for FontConfigParser test\n"); |
+ } |
} |