diff options
author | Brian Salomon <bsalomon@google.com> | 2018-01-29 09:50:47 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-29 15:17:09 +0000 |
commit | 1c80e99dd5b23ebc3f10c768857a21887ab9f090 (patch) | |
tree | 491fa16698ffb07569718ef49cbb7ac8f9562374 /tests/FontNamesTest.cpp | |
parent | 5effc281c70e111b3c5e9da9882c1981699af26f (diff) |
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 <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/FontNamesTest.cpp')
-rw-r--r-- | tests/FontNamesTest.cpp | 36 |
1 files changed, 16 insertions, 20 deletions
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()); } |