API change: SkPath computeBounds -> getBounds



git-svn-id: http://skia.googlecode.com/svn/trunk@140 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 383ad03..0e44719 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -11,16 +11,11 @@
     REPORTER_ASSERT(reporter, p == p2);
     REPORTER_ASSERT(reporter, !(p != p2));
 
-    // initialize bounds to not-empty
-    bounds.set(0, 0, SK_Scalar1, SK_Scalar1);
-    p.computeBounds(&bounds, SkPath::kFast_BoundsType);
-    REPORTER_ASSERT(reporter, bounds.isEmpty());
+    REPORTER_ASSERT(reporter, p.getBounds().isEmpty());
     
     bounds.set(0, 0, SK_Scalar1, SK_Scalar1);
     p.addRect(bounds);
-    bounds2.setEmpty();
-    p.computeBounds(&bounds2, SkPath::kFast_BoundsType);
-    REPORTER_ASSERT(reporter, bounds == bounds2);
+    REPORTER_ASSERT(reporter, bounds == p.getBounds());
 
     REPORTER_ASSERT(reporter, p != p2);
     REPORTER_ASSERT(reporter, !(p == p2));
@@ -35,8 +30,7 @@
     
     bounds.offset(SK_Scalar1*3, SK_Scalar1*4);
     p.offset(SK_Scalar1*3, SK_Scalar1*4);
-    p.computeBounds(&bounds2, SkPath::kFast_BoundsType);
-    REPORTER_ASSERT(reporter, bounds == bounds2);
+    REPORTER_ASSERT(reporter, bounds == p.getBounds());
 
 #if 0 // isRect needs to be implemented
     REPORTER_ASSERT(reporter, p.isRect(NULL));
diff --git a/tests/main.cpp b/tests/main.cpp
index 7975de0..13f8817 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -1,9 +1,11 @@
-#include <iostream>
 #include "SkGraphics.h"
 #include "Test.h"
 
 using namespace skiatest;
 
+// need to explicitly declare this, or we get some weird infinite loop llist
+template TestRegistry* TestRegistry::gHead;
+
 class Iter {
 public:
     Iter(Reporter* r) : fReporter(r) {
@@ -35,13 +37,13 @@
     return result == Reporter::kPassed ? "passed" : "FAILED";
 }
 
-class PrintfReporter : public Reporter {
+class DebugfReporter : public Reporter {
 protected:
     virtual void onStart(Test* test) {
-        printf("Running %s...\n", test->getName());
+        SkDebugf("Running %s...\n", test->getName());
     }
     virtual void onReport(const char desc[], Reporter::Result result) {
-        printf("\t%s: %s\n", result2string(result), desc);
+        SkDebugf("\t%s: %s\n", result2string(result), desc);
     }
     virtual void onEnd(Test* test) {}
 };
@@ -59,7 +61,7 @@
 int main (int argc, char * const argv[]) {
     SkAutoGraphics ag;
 
-    PrintfReporter reporter;
+    DebugfReporter reporter;
     Iter iter(&reporter);
     Test* test;
     
@@ -71,7 +73,7 @@
     int total = reporter.countTests();
     int passed = reporter.countResults(Reporter::kPassed);
     int failed = reporter.countResults(Reporter::kFailed);
-    printf("Tests=%d Passed=%d (%g%%) Failed=%d (%g%%)\n", total,
+    SkDebugf("Tests=%d Passed=%d (%g%%) Failed=%d (%g%%)\n", total,
            passed, passed * 100.f / total,
            failed, failed * 100.f / total);