add optional storage parameter to SkWriter32
git-svn-id: http://skia.googlecode.com/svn/trunk@3759 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/Writer32Test.cpp b/tests/Writer32Test.cpp
index a9a07ad..35fb29f 100644
--- a/tests/Writer32Test.cpp
+++ b/tests/Writer32Test.cpp
@@ -76,6 +76,24 @@
writer.reset(storage, sizeof(storage));
test2(reporter, &writer);
}
+
+ // small storage
+ {
+ intptr_t storage[8];
+ SkWriter32 writer(100, storage, sizeof(storage));
+ test1(reporter, &writer);
+ writer.reset(); // should just rewind our storage
+ test2(reporter, &writer);
+ }
+
+ // large storage
+ {
+ intptr_t storage[1024];
+ SkWriter32 writer(100, storage, sizeof(storage));
+ test1(reporter, &writer);
+ writer.reset(); // should just rewind our storage
+ test2(reporter, &writer);
+ }
}
#include "TestClassDef.h"