diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-08 07:01:40 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-08 07:01:40 +0000 |
commit | 2b34fe01d7b5736b212eb4886afc723a7b9241ae (patch) | |
tree | 32a2a6b1eef8bbc6026f625ebf9c2675cb07b5cc /tests | |
parent | 6862cbad085729acb77825392c8c2a4f888a99cf (diff) |
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9051 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PathOpsCubicQuadIntersectionTest.cpp | 12 | ||||
-rw-r--r-- | tests/PathOpsLineIntersectionTest.cpp | 2 | ||||
-rw-r--r-- | tests/PathOpsSkpClipTest.cpp | 122 |
3 files changed, 68 insertions, 68 deletions
diff --git a/tests/PathOpsCubicQuadIntersectionTest.cpp b/tests/PathOpsCubicQuadIntersectionTest.cpp index 8b47a8e60f..8a31814ee4 100644 --- a/tests/PathOpsCubicQuadIntersectionTest.cpp +++ b/tests/PathOpsCubicQuadIntersectionTest.cpp @@ -16,12 +16,12 @@ static struct lineCubic { int answerCount; SkDPoint answers[2]; } quadCubicTests[] = { - {{{{10,234}, {10,229.58172607421875}, {13.581720352172852,226}, {18,226}}},
- {{{18,226}, {14.686291694641113,226}, {12.342399597167969,228.3424072265625}}}, 1,
- {{18,226}, {0,0}}},
- {{{{10,234}, {10,229.58172607421875}, {13.581720352172852,226}, {18,226}}},
- {{{12.342399597167969,228.3424072265625}, {10,230.68629455566406}, {10,234}}}, 1,
- {{10,234}, {0,0}}},
+ {{{{10,234}, {10,229.58172607421875}, {13.581720352172852,226}, {18,226}}}, + {{{18,226}, {14.686291694641113,226}, {12.342399597167969,228.3424072265625}}}, 1, + {{18,226}, {0,0}}}, + {{{{10,234}, {10,229.58172607421875}, {13.581720352172852,226}, {18,226}}}, + {{{12.342399597167969,228.3424072265625}, {10,230.68629455566406}, {10,234}}}, 1, + {{10,234}, {0,0}}}, }; static const size_t quadCubicTests_count = SK_ARRAY_COUNT(quadCubicTests); diff --git a/tests/PathOpsLineIntersectionTest.cpp b/tests/PathOpsLineIntersectionTest.cpp index b1bb66716b..db6003da9d 100644 --- a/tests/PathOpsLineIntersectionTest.cpp +++ b/tests/PathOpsLineIntersectionTest.cpp @@ -91,7 +91,7 @@ static void PathOpsLineIntersectionTest(skiatest::Reporter* reporter) { const SkDLine& line2 = noIntersect[index][1]; SkIntersections ts; int pts = ts.intersect(line1, line2); - REPORTER_ASSERT(reporter, !pts); + REPORTER_ASSERT(reporter, !pts); REPORTER_ASSERT(reporter, pts == ts.used()); } } diff --git a/tests/PathOpsSkpClipTest.cpp b/tests/PathOpsSkpClipTest.cpp index 595a91a99f..d14cde54ce 100644 --- a/tests/PathOpsSkpClipTest.cpp +++ b/tests/PathOpsSkpClipTest.cpp @@ -1,61 +1,61 @@ -#include "SkBitmap.h"
-#include "SkDevice.h"
-#include "SkCanvas.h"
-#include "SkImageEncoder.h"
-#include "SkStream.h"
-#include "SkOSFile.h"
-#include "SkPicture.h"
-#include "SkString.h"
-#include "Test.h"
-
-static void make_filepath(SkString* path, const char* dir, const SkString& name) {
- size_t len = strlen(dir);
- path->set(dir);
- if (len > 0 && dir[len - 1] != '/') {
- path->append("\\");
- }
- path->append(name);
-}
-
-static void PathOpsSkpClipTest(skiatest::Reporter* reporter) {
-const char pictDir[] = "C:\\Users\\caryclark\\skp";
- const char outSkpClipDir[] = "C:\\Users\\caryclark\\skpClip";
- const char outOldClipDir[] = "C:\\Users\\caryclark\\oldClip";
- SkOSFile::Iter iter(pictDir, "skp");
- SkString filename;
- while (iter.next(&filename)) {
-#if 0
- if (strcmp(filename.c_str(), "tabl_androidpolice.skp")) {
- continue;
- }
-#endif
- SkString path;
- make_filepath(&path, pictDir, filename);
- SkFILEStream stream(path.c_str());
- if (!stream.isValid()) {
- continue;
- }
- SkPicture* pic = SkNEW_ARGS(SkPicture, (&stream));
- int width = pic->width();
- int height = pic->height();
- SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
- bitmap.allocPixels();
- SkCanvas canvas(bitmap);
- filename.remove(filename.size() - 3, 3);
- filename.append("png");
- for (int i = 0; i < 2; ++i) {
- bool useOp = i ? true : false;
- canvas.setAllowSimplifyClip(useOp);
- pic->draw(&canvas);
- SkString outFile;
- make_filepath(&outFile, useOp ? outSkpClipDir : outOldClipDir, filename);
- SkImageEncoder::EncodeFile(outFile.c_str(), bitmap, SkImageEncoder::kPNG_Type, 100);
- }
- SkDELETE(pic);
- reporter->bumpTestCount();
- }
-}
-
-#include "TestClassDef.h"
-DEFINE_TESTCLASS_SHORT(PathOpsSkpClipTest)
+#include "SkBitmap.h" +#include "SkDevice.h" +#include "SkCanvas.h" +#include "SkImageEncoder.h" +#include "SkStream.h" +#include "SkOSFile.h" +#include "SkPicture.h" +#include "SkString.h" +#include "Test.h" + +static void make_filepath(SkString* path, const char* dir, const SkString& name) { + size_t len = strlen(dir); + path->set(dir); + if (len > 0 && dir[len - 1] != '/') { + path->append("\\"); + } + path->append(name); +} + +static void PathOpsSkpClipTest(skiatest::Reporter* reporter) { +const char pictDir[] = "C:\\Users\\caryclark\\skp"; + const char outSkpClipDir[] = "C:\\Users\\caryclark\\skpClip"; + const char outOldClipDir[] = "C:\\Users\\caryclark\\oldClip"; + SkOSFile::Iter iter(pictDir, "skp"); + SkString filename; + while (iter.next(&filename)) { +#if 0 + if (strcmp(filename.c_str(), "tabl_androidpolice.skp")) { + continue; + } +#endif + SkString path; + make_filepath(&path, pictDir, filename); + SkFILEStream stream(path.c_str()); + if (!stream.isValid()) { + continue; + } + SkPicture* pic = SkNEW_ARGS(SkPicture, (&stream)); + int width = pic->width(); + int height = pic->height(); + SkBitmap bitmap; + bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height); + bitmap.allocPixels(); + SkCanvas canvas(bitmap); + filename.remove(filename.size() - 3, 3); + filename.append("png"); + for (int i = 0; i < 2; ++i) { + bool useOp = i ? true : false; + canvas.setAllowSimplifyClip(useOp); + pic->draw(&canvas); + SkString outFile; + make_filepath(&outFile, useOp ? outSkpClipDir : outOldClipDir, filename); + SkImageEncoder::EncodeFile(outFile.c_str(), bitmap, SkImageEncoder::kPNG_Type, 100); + } + SkDELETE(pic); + reporter->bumpTestCount(); + } +} + +#include "TestClassDef.h" +DEFINE_TESTCLASS_SHORT(PathOpsSkpClipTest) |