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

Side by Side Diff: tests/AnnotationTest.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/AndroidPaintTest.cpp ('k') | tests/AtomicTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Test.h" 8 #include "Test.h"
9 #include "TestClassDef.h"
10 #include "SkAnnotation.h" 9 #include "SkAnnotation.h"
11 #include "SkData.h" 10 #include "SkData.h"
12 #include "SkCanvas.h" 11 #include "SkCanvas.h"
13 #include "SkPDFDevice.h" 12 #include "SkPDFDevice.h"
14 #include "SkPDFDocument.h" 13 #include "SkPDFDocument.h"
15 14
16 /** Returns true if data (may contain null characters) contains needle (null 15 /** Returns true if data (may contain null characters) contains needle (null
17 * terminated). */ 16 * terminated). */
18 static bool ContainsString(const char* data, size_t dataSize, const char* needle ) { 17 static bool ContainsString(const char* data, size_t dataSize, const char* needle ) {
19 size_t nSize = strlen(needle); 18 size_t nSize = strlen(needle);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 SkPDFDocument doc; 87 SkPDFDocument doc;
89 doc.appendPage(&device); 88 doc.appendPage(&device);
90 SkDynamicMemoryWStream outStream; 89 SkDynamicMemoryWStream outStream;
91 doc.emitPDF(&outStream); 90 doc.emitPDF(&outStream);
92 SkAutoDataUnref out(outStream.copyToData()); 91 SkAutoDataUnref out(outStream.copyToData());
93 const char* rawOutput = (const char*)out->data(); 92 const char* rawOutput = (const char*)out->data();
94 93
95 REPORTER_ASSERT(reporter, 94 REPORTER_ASSERT(reporter,
96 ContainsString(rawOutput, out->size(), "/example ")); 95 ContainsString(rawOutput, out->size(), "/example "));
97 } 96 }
OLDNEW
« no previous file with comments | « tests/AndroidPaintTest.cpp ('k') | tests/AtomicTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698