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

Unified Diff: tests/PathUtilsTest.cpp

Issue 19272014: More PathUtilsTest.cpp nits (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698