From 1c80e99dd5b23ebc3f10c768857a21887ab9f090 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 29 Jan 2018 09:50:47 -0500 Subject: Allow printf style var args for messages in REPORTER_ASSERT. Remove REPORTER_ASSERT_MESSAGE. Change-Id: I6d00715901159c93e22d182fe24aac92b5fdbcf4 Reviewed-on: https://skia-review.googlesource.com/100361 Commit-Queue: Brian Salomon Reviewed-by: Mike Klein --- tests/FontNamesTest.cpp | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'tests/FontNamesTest.cpp') diff --git a/tests/FontNamesTest.cpp b/tests/FontNamesTest.cpp index e5dce32a1a..3218b29e52 100644 --- a/tests/FontNamesTest.cpp +++ b/tests/FontNamesTest.cpp @@ -115,26 +115,22 @@ static void test_synthetic(skiatest::Reporter* reporter, bool verbose) { SkOTTableName::Iterator::Record record; size_t nameIndex = 0; while (nameIndex < test[i].nameCount && iter.next(record)) { - REPORTER_ASSERT_MESSAGE(reporter, - strcmp(test[i].names[nameIndex].name, record.name.c_str()) == 0, - "Name did not match." - ); + REPORTER_ASSERT(reporter, + strcmp(test[i].names[nameIndex].name, record.name.c_str()) == 0, + "Name did not match."); - REPORTER_ASSERT_MESSAGE(reporter, - strcmp(test[i].names[nameIndex].language, record.language.c_str()) == 0, - "Language did not match." - ); + REPORTER_ASSERT(reporter, + strcmp(test[i].names[nameIndex].language, record.language.c_str()) == 0, + "Language did not match."); //printf("%s <%s>\n", record.name.c_str(), record.language.c_str()); ++nameIndex; } - REPORTER_ASSERT_MESSAGE(reporter, nameIndex == test[i].nameCount, - "Fewer names than expected."); + REPORTER_ASSERT(reporter, nameIndex == test[i].nameCount, "Fewer names than expected."); - REPORTER_ASSERT_MESSAGE(reporter, !iter.next(record), - "More names than expected."); + REPORTER_ASSERT(reporter, !iter.next(record), "More names than expected."); } } @@ -183,10 +179,10 @@ static void test_systemfonts(skiatest::Reporter* reporter, bool verbose) { SkOTTableName::Iterator familyNameIter(*((SkOTTableName*)nameTableData.get()), SkOTTableName::Record::NameID::Predefined::FontFamilyName); while (familyNameIter.next(record)) { - REPORTER_ASSERT_MESSAGE(reporter, - SkOTTableName::Record::NameID::Predefined::FontFamilyName == record.type, - "Requested family name, got something else." - ); + REPORTER_ASSERT( + reporter, + SkOTTableName::Record::NameID::Predefined::FontFamilyName == record.type, + "Requested family name, got something else."); if (verbose) { SkDebugf("{%s} <%s>\n", record.name.c_str(), record.language.c_str()); } @@ -195,10 +191,10 @@ static void test_systemfonts(skiatest::Reporter* reporter, bool verbose) { SkOTTableName::Iterator styleNameIter(*((SkOTTableName*)nameTableData.get()), SkOTTableName::Record::NameID::Predefined::FontSubfamilyName); while (styleNameIter.next(record)) { - REPORTER_ASSERT_MESSAGE(reporter, - SkOTTableName::Record::NameID::Predefined::FontSubfamilyName == record.type, - "Requested subfamily name, got something else." - ); + REPORTER_ASSERT( + reporter, + SkOTTableName::Record::NameID::Predefined::FontSubfamilyName == record.type, + "Requested subfamily name, got something else."); if (verbose) { SkDebugf("{{%s}} <%s>\n", record.name.c_str(), record.language.c_str()); } -- cgit v1.2.3