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

Unified Diff: src/utils/SkBase64.cpp

Issue 132233060: Port SkBase64 test to our test driver. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: mtklein review Created 6 years, 11 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 | « src/utils/SkBase64.h ('k') | tests/SkBase64Test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkBase64.cpp
diff --git a/src/utils/SkBase64.cpp b/src/utils/SkBase64.cpp
index 11b647fe9a50c2e18c9a49a97dc8ffc74c7f9667..545a8ebb216a11a7fed3fe66e5885f199af6ab36 100644
--- a/src/utils/SkBase64.cpp
+++ b/src/utils/SkBase64.cpp
@@ -162,24 +162,3 @@ SkBase64::Error SkBase64::decode(const char* src, size_t len) {
decode(src, len, true);
return kNoError;
}
-
-#ifdef SK_SUPPORT_UNITTEST
-void SkBase64::UnitTest() {
- signed char all[256];
- for (int index = 0; index < 256; index++)
- all[index] = (signed char) (index + 1);
- for (int offset = 0; offset < 6; offset++) {
- size_t length = 256 - offset;
- size_t encodeLength = Encode(all + offset, length, NULL);
- char* src = (char*)sk_malloc_throw(encodeLength + 1);
- Encode(all + offset, length, src);
- src[encodeLength] = '\0';
- SkBase64 tryMe;
- tryMe.decode(src, encodeLength);
- SkASSERT(length == tryMe.fLength);
- SkASSERT(strcmp((const char*) (all + offset), tryMe.fData) == 0);
- sk_free(src);
- delete[] tryMe.fData;
- }
-}
-#endif
« no previous file with comments | « src/utils/SkBase64.h ('k') | tests/SkBase64Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698