Index: tests/SkBase64Test.cpp |
=================================================================== |
--- tests/SkBase64Test.cpp (revision 13274) |
+++ tests/SkBase64Test.cpp (working copy) |
@@ -11,15 +11,16 @@ |
DEF_TEST(SkBase64Test, reporter) { |
char all[256]; |
- for (int index = 0; index < 256; index++) { |
+ for (int index = 0; index < 256; ++index) { |
tfarina
2014/02/01 15:46:21
does pre-increment makes any difference here, or w
robertphillips
2014/02/01 15:50:24
In this case it doesn't make any performance diffe
|
all[index] = (signed char) (index + 1); |
} |
- for (int offset = 0; offset < 6; offset++) { |
+ for (int offset = 0; offset < 6; ++offset) { |
size_t length = 256 - offset; |
size_t encodeLength = SkBase64::Encode(all + offset, length, NULL); |
SkAutoTMalloc<char> src(encodeLength + 1); |
SkBase64::Encode(all + offset, length, src.get()); |
+ src[encodeLength] = '\0'; |
tfarina
2014/02/01 15:46:21
looks like I removed this when I used SkAutoMalloc
robertphillips
2014/02/01 15:50:24
Yep - np. The recent noise on the valgrind bot hid
|
SkBase64 tryMe; |
tryMe.decode(src.get(), encodeLength); |
REPORTER_ASSERT(reporter, (strcmp((const char*) (all + offset), tryMe.getData()) == 0)); |