Chromium Code Reviews| Index: tests/PathUtilsTest.cpp |
| diff --git a/tests/PathUtilsTest.cpp b/tests/PathUtilsTest.cpp |
| index 2c403e3743db768634b3a958352db6619a0c8514..223682eed8c2a8a229eec98e59fb5e09f1fd3145 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; |
|
tfarina
2013/07/16 18:08:50
you don't need this forward declaration, since you
|
| +const int kNumIt = 100; |
| + |
| static void fill_random_bits( int chars, char* bits ){ |
|
tfarina
2013/07/16 18:08:50
micro-style-nit: no need of whitespace after ( and
|
| SkMWCRandom rand(SkTime::GetMSecs()); |
| @@ -32,6 +32,7 @@ static int get_bit( const char* buffer, int x ) { |
| return buffer[byte] & (128 >> bit); |
| } |
| + |
| /* // useful for debugging errors |
| #include <iostream> |
|
tfarina
2013/07/16 18:08:50
can we move this include above?
Oh, looks like al
|
| static void print_bits( const char* bits, int w, int h) { |
| @@ -57,7 +58,7 @@ static void print_bmp( SkBitmap* bmp, int w, int h){ |
| } |
| std::cout << std::endl; |
| } |
| - } |
| +} |
| */ |
| static void binary_to_skbitmap(const char* bin_bmp, SkBitmap* sk_bmp, |
| @@ -139,7 +140,7 @@ static void TestPathUtils(skiatest::Reporter* reporter) { |
| 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 |