Preprend Test to test function name generated by DEF_TEST() macro.

That way when declaring a test with DEF_TEST() macro, you don't have to
uniquify the test name because it might colide with the class it is
being testing.

For example, if you are testing SkBase64 and do:

DEF_TEST(SkBase64, reporter) {
}

That will generate an error because the macro will declare a function
named SkBase64 which colides with the type SkBase64.

By adding Test to the function name we avoid this problem.

Fixed the entries found with the following command line:

$ git grep "Test, r" | grep DEF

BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/345753007
diff --git a/tests/GrBinHashKeyTest.cpp b/tests/GrBinHashKeyTest.cpp
index 96b851f..fbcf482 100644
--- a/tests/GrBinHashKeyTest.cpp
+++ b/tests/GrBinHashKeyTest.cpp
@@ -12,7 +12,7 @@
 
 #include "Test.h"
 
-DEF_TEST(GrBinHashKeyTest, reporter) {
+DEF_TEST(GrBinHashKey, reporter) {
     const char* testStringA_ = "abcdABCD";
     const char* testStringB_ = "abcdBBCD";
     const uint32_t* testStringA = reinterpret_cast<const uint32_t*>(testStringA_);
diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp
index 461a57a..0191f1a 100644
--- a/tests/GrContextFactoryTest.cpp
+++ b/tests/GrContextFactoryTest.cpp
@@ -10,7 +10,7 @@
 #include "GrContextFactory.h"
 #include "Test.h"
 
-DEF_GPUTEST(GrContextFactoryTest, reporter, factory) {
+DEF_GPUTEST(GrContextFactory, reporter, factory) {
     // Reset in case some other test has been using it first.
     factory->destroyContexts();
 
diff --git a/tests/GrOrderedSetTest.cpp b/tests/GrOrderedSetTest.cpp
index e449fa2..7b3db9d 100644
--- a/tests/GrOrderedSetTest.cpp
+++ b/tests/GrOrderedSetTest.cpp
@@ -14,7 +14,7 @@
 typedef GrOrderedSet<int> Set;
 typedef GrOrderedSet<const char*, GrStrLess> Set2;
 
-DEF_TEST(GrOrderedSetTest, reporter) {
+DEF_TEST(GrOrderedSet, reporter) {
     Set set;
 
     REPORTER_ASSERT(reporter, set.empty());
diff --git a/tests/GrRedBlackTreeTest.cpp b/tests/GrRedBlackTreeTest.cpp
index bb0fa15..c517cf2 100644
--- a/tests/GrRedBlackTreeTest.cpp
+++ b/tests/GrRedBlackTreeTest.cpp
@@ -14,7 +14,7 @@
 
 typedef GrRedBlackTree<int> Tree;
 
-DEF_TEST(GrRedBlackTreeTest, reporter) {
+DEF_TEST(GrRedBlackTree, reporter) {
     Tree tree;
 
     SkRandom r;
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index b73adc0..ff67b1b 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -14,7 +14,7 @@
 #include "SkTypes.h"
 #include "Test.h"
 
-DEF_GPUTEST(GrSurfaceTest, reporter, factory) {
+DEF_GPUTEST(GrSurface, reporter, factory) {
     GrContext* context = factory->get(GrContextFactory::kNull_GLContextType);
     if (NULL != context) {
         GrTextureDesc desc;
diff --git a/tests/GrTBSearchTest.cpp b/tests/GrTBSearchTest.cpp
index 70a24d3..d057807 100644
--- a/tests/GrTBSearchTest.cpp
+++ b/tests/GrTBSearchTest.cpp
@@ -22,7 +22,7 @@
 
 #include "GrTBSearch.h"
 
-DEF_TEST(GrTBSearchTest, reporter) {
+DEF_TEST(GrTBSearch, reporter) {
     const int array[] = {
         1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99
     };
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index cd6d235..3a38eea 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -464,7 +464,7 @@
     test_crop_rects(&device, reporter);
 }
 
-DEF_TEST(ImageFilterMatrixTest, reporter) {
+DEF_TEST(ImageFilterMatrix, reporter) {
     SkBitmap temp;
     temp.allocN32Pixels(100, 100);
     SkBitmapDevice device(temp);
@@ -494,8 +494,7 @@
     canvas.drawPicture(picture);
 }
 
-DEF_TEST(ImageFilterPictureImageFilterTest, reporter) {
-
+DEF_TEST(ImageFilterPictureImageFilter, reporter) {
     SkRTreeFactory factory;
     SkPictureRecorder recorder;
     SkCanvas* recordingCanvas = recorder.beginRecording(1, 1, &factory, 0);
@@ -554,8 +553,7 @@
     REPORTER_ASSERT(reporter, pixel != SK_ColorGREEN);
 }
 
-DEF_TEST(ImageFilterEmptySaveLayerTest, reporter) {
-
+DEF_TEST(ImageFilterEmptySaveLayer, reporter) {
     // Even when there's an empty saveLayer()/restore(), ensure that an image
     // filter or color filter which affects transparent black still draws.
 
diff --git a/tests/RecordingTest.cpp b/tests/RecordingTest.cpp
index 8de52da..0066556 100644
--- a/tests/RecordingTest.cpp
+++ b/tests/RecordingTest.cpp
@@ -11,7 +11,7 @@
 
 // Minimally exercise the public SkRecording API.
 
-DEF_TEST(RecordingTest, r) {
+DEF_TEST(SkRecording, r) {
     EXPERIMENTAL::SkRecording recording(1920, 1080);
 
     // Some very exciting commands here.
diff --git a/tests/SkBase64Test.cpp b/tests/SkBase64Test.cpp
index 217e2ca..14ff1f7 100644
--- a/tests/SkBase64Test.cpp
+++ b/tests/SkBase64Test.cpp
@@ -9,7 +9,7 @@
 
 #include "Test.h"
 
-DEF_TEST(SkBase64Test, reporter) {
+DEF_TEST(SkBase64, reporter) {
     char all[256];
     for (int index = 0; index < 256; ++index) {
         all[index] = (signed char) (index + 1);
diff --git a/tests/Test.h b/tests/Test.h
index fc18900..72b0bee 100644
--- a/tests/Test.h
+++ b/tests/Test.h
@@ -138,38 +138,38 @@
         (reporter)->reportFailed(desc);             \
     } while(0)
 
-#define DEF_TEST(name, reporter)                                   \
-    static void name(skiatest::Reporter*);                         \
-    namespace skiatest {                                           \
-    class name##Class : public Test {                              \
-    public:                                                        \
-        static Test* Factory(void*) { return SkNEW(name##Class); } \
-    protected:                                                     \
-        virtual void onGetName(SkString* name) SK_OVERRIDE {       \
-            name->set(#name);                                      \
-        }                                                          \
-        virtual void onRun(Reporter* r) SK_OVERRIDE { name(r); }   \
-    };                                                             \
-    static TestRegistry gReg_##name##Class(name##Class::Factory);  \
-    }                                                              \
-    static void name(skiatest::Reporter* reporter)
+#define DEF_TEST(name, reporter)                                        \
+    static void test_##name(skiatest::Reporter*);                       \
+    namespace skiatest {                                                \
+    class name##Class : public Test {                                   \
+    public:                                                             \
+        static Test* Factory(void*) { return SkNEW(name##Class); }      \
+    protected:                                                          \
+        virtual void onGetName(SkString* name) SK_OVERRIDE {            \
+            name->set(#name);                                           \
+        }                                                               \
+        virtual void onRun(Reporter* r) SK_OVERRIDE { test_##name(r); } \
+    };                                                                  \
+    static TestRegistry gReg_##name##Class(name##Class::Factory);       \
+    }                                                                   \
+    static void test_##name(skiatest::Reporter* reporter)
 
-#define DEF_GPUTEST(name, reporter, factory)                       \
-    static void name(skiatest::Reporter*, GrContextFactory*);      \
-    namespace skiatest {                                           \
-    class name##Class : public GpuTest {                           \
-    public:                                                        \
-        static Test* Factory(void*) { return SkNEW(name##Class); } \
-    protected:                                                     \
-        virtual void onGetName(SkString* name) SK_OVERRIDE {       \
-            name->set(#name);                                      \
-        }                                                          \
-        virtual void onRun(Reporter* r) SK_OVERRIDE {              \
-            name(r, fGrContextFactory);                            \
-        }                                                          \
-    };                                                             \
-    static TestRegistry gReg_##name##Class(name##Class::Factory);  \
-    }                                                              \
-    static void name(skiatest::Reporter* reporter, GrContextFactory* factory)
+#define DEF_GPUTEST(name, reporter, factory)                          \
+    static void test_##name(skiatest::Reporter*, GrContextFactory*);  \
+    namespace skiatest {                                              \
+    class name##Class : public GpuTest {                              \
+    public:                                                           \
+        static Test* Factory(void*) { return SkNEW(name##Class); }    \
+    protected:                                                        \
+        virtual void onGetName(SkString* name) SK_OVERRIDE {          \
+            name->set(#name);                                         \
+        }                                                             \
+        virtual void onRun(Reporter* r) SK_OVERRIDE {                 \
+            test_##name(r, fGrContextFactory);                        \
+        }                                                             \
+    };                                                                \
+    static TestRegistry gReg_##name##Class(name##Class::Factory);     \
+    }                                                                 \
+    static void test_##name(skiatest::Reporter* reporter, GrContextFactory* factory)
 
 #endif
diff --git a/tests/UnitTestTest.cpp b/tests/UnitTestTest.cpp
index 35432cd..f42281f 100644
--- a/tests/UnitTestTest.cpp
+++ b/tests/UnitTestTest.cpp
@@ -8,7 +8,7 @@
 #include "SkRTConf.h"
 #include "Test.h"
 
-DEF_TEST(UnitTest, reporter) {
+DEF_TEST(SkRTConfRegistry, reporter) {
 #ifdef SK_SUPPORT_UNITTEST
     SkRTConfRegistry::UnitTest();
 #endif