aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-10-12 23:08:13 +0000
committerGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-10-12 23:08:13 +0000
commitd877fdbb6e64692285c3e6532d88b9458f65b3cd (patch)
treec346892a4d2d014c95acc6729174c779d0bfcd02 /tests
parentf66025d59ab4c8c4439fabf6ad89ddf35a19d1fd (diff)
High level pdf classes and pdf specific interface.
The guts of the implementation will be in SkPDFDevice and below. This is a first implementation of everything above that point. Review URL: http://codereview.appspot.com/2342043 git-svn-id: http://skia.googlecode.com/svn/trunk@602 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/PDFPrimitivesTest.cpp4
-rw-r--r--tests/StringTest.cpp16
2 files changed, 18 insertions, 2 deletions
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 7e4465b27d..5dcb73cd6f 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -175,12 +175,12 @@ static void TestPDFPrimitives(skiatest::Reporter* reporter) {
SkRefPtr<SkPDFStream> stream = new SkPDFStream(streamData.get());
stream->unref(); // SkRefPtr and new both took a reference.
CheckObjectOutput(reporter, stream.get(),
- "<</Length 12\n>> stream\nTest\nFoo\tBarendstream\n",
+ "<</Length 12\n>> stream\nTest\nFoo\tBarendstream",
true);
stream->insert(n1.get(), int42.get());
CheckObjectOutput(reporter, stream.get(),
"<</Length 12\n/n1 42\n>> stream\nTest\nFoo\tBar"
- "endstream\n",
+ "endstream",
true);
TestCatalog(reporter);
diff --git a/tests/StringTest.cpp b/tests/StringTest.cpp
index 344c752c8c..2e691f4809 100644
--- a/tests/StringTest.cpp
+++ b/tests/StringTest.cpp
@@ -48,6 +48,22 @@ static void TestString(skiatest::Reporter* reporter) {
a.set("ab");
a.set("abc");
a.set("abcd");
+
+ a.set("");
+ a.appendS64(72036854775808LL, 0);
+ REPORTER_ASSERT(reporter, a.equals("72036854775808"));
+
+ a.set("");
+ a.appendS64(-1844674407370LL, 0);
+ REPORTER_ASSERT(reporter, a.equals("-1844674407370"));
+
+ a.set("");
+ a.appendS64(73709551616LL, 15);
+ REPORTER_ASSERT(reporter, a.equals("000073709551616"));
+
+ a.set("");
+ a.appendS64(-429496729612LL, 15);
+ REPORTER_ASSERT(reporter, a.equals("-000429496729612"));
}
#include "TestClassDef.h"