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

Unified Diff: tests/ARGBImageEncoderTest.cpp

Issue 122943004: Convert two more tests to DEF_TEST() macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix typo Created 6 years, 12 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
« no previous file with comments | « no previous file | tests/BitmapHasherTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ARGBImageEncoderTest.cpp
diff --git a/tests/ARGBImageEncoderTest.cpp b/tests/ARGBImageEncoderTest.cpp
index bffcaa4f7873001d451f42eb628d7cf22277b8a5..8157cc779f61048cff81b7954d7eff5d83be8c17 100644
--- a/tests/ARGBImageEncoderTest.cpp
+++ b/tests/ARGBImageEncoderTest.cpp
@@ -5,30 +5,20 @@
* found in the LICENSE file.
*/
-/** Tests for ARGBImageEncoder. */
+#include "SkImageEncoder.h"
-#include "Test.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
-#include "SkImageEncoder.h"
#include "SkStream.h"
-
-namespace skiatest {
-
-class BitmapTransformerTestClass : public Test {
-public:
- static Test* Factory(void*) { return SkNEW(BitmapTransformerTestClass); }
-protected:
- virtual void onGetName(SkString* name) SK_OVERRIDE { name->set("ARGBImageEncoder"); }
- virtual void onRun(Reporter* reporter) SK_OVERRIDE;
-};
+#include "Test.h"
+#include "TestClassDef.h"
static SkBitmap::Config configs[] = {
- SkBitmap::kRGB_565_Config,
- SkBitmap::kARGB_8888_Config,
+ SkBitmap::kRGB_565_Config,
+ SkBitmap::kARGB_8888_Config,
};
-void BitmapTransformerTestClass::onRun(Reporter* reporter) {
+DEF_TEST(ARGBImageEncoder, reporter) {
// Bytes we expect to get:
const int kWidth = 3;
const int kHeight = 5;
@@ -71,7 +61,3 @@ void BitmapTransformerTestClass::onRun(Reporter* reporter) {
REPORTER_ASSERT(reporter, memcmp(pixelBuffer, comparisonBuffer, bufferSize) == 0);
}
}
-
-static TestRegistry gReg(BitmapTransformerTestClass::Factory);
-
-}
« no previous file with comments | « no previous file | tests/BitmapHasherTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698