More PathUtilsTest.cpp nits
Reordered the includes, changed define to a constant global var.
more PathUtils Nits
BUG=
R=robertphillips@google.com, tfarina@chromium.org
Author: dierk@google.com
Review URL: https://chromiumcodereview.appspot.com/19272014
git-svn-id: http://skia.googlecode.com/svn/trunk@10110 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PathUtilsTest.cpp b/tests/PathUtilsTest.cpp
index 2c403e3..223682e 100644
--- a/tests/PathUtilsTest.cpp
+++ b/tests/PathUtilsTest.cpp
@@ -6,18 +6,18 @@
* found in the LICENSE file.
*/
-#include "Test.h"
+#include "SkPathUtils.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
-#include "SkPathUtils.h"
#include "SkRandom.h"
#include "SkTime.h"
-
-#define SK_NUM_IT 100
+#include "Test.h"
class SkBitmap;
+const int kNumIt = 100;
+
static void fill_random_bits( int chars, char* bits ){
SkMWCRandom rand(SkTime::GetMSecs());
@@ -32,6 +32,7 @@
return buffer[byte] & (128 >> bit);
}
+
/* // useful for debugging errors
#include <iostream>
static void print_bits( const char* bits, int w, int h) {
@@ -57,7 +58,7 @@
}
std::cout << std::endl;
}
- }
+}
*/
static void binary_to_skbitmap(const char* bin_bmp, SkBitmap* sk_bmp,
@@ -139,7 +140,7 @@
static char* binBmp = &bits[0];
//loop to run randomized test lots of times
- for (int it = 0; it < SK_NUM_IT; ++it)
+ for (int it = 0; it < kNumIt; ++it)
{
// generate a random binary bitmap
fill_random_bits( h * rowBytes, binBmp); // generate random bitmap