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

Side by Side Diff: tests/PathTest.cpp

Issue 676803002: add float equivalent in dumpHex output as comment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: adjust path test to match additional output Created 6 years, 2 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
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | 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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkPaint.h" 9 #include "SkPaint.h"
10 #include "SkParse.h" 10 #include "SkParse.h"
(...skipping 3450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3461 compare_dump(reporter, p, false, false, "path.moveTo(1, 2);\n" 3461 compare_dump(reporter, p, false, false, "path.moveTo(1, 2);\n"
3462 "path.conicTo(3, 4, 5, 6, 0.5f);\n") ; 3462 "path.conicTo(3, 4, 5, 6, 0.5f);\n") ;
3463 p.reset(); 3463 p.reset();
3464 p.moveTo(1, 2); 3464 p.moveTo(1, 2);
3465 p.cubicTo(3, 4, 5, 6, 7, 8); 3465 p.cubicTo(3, 4, 5, 6, 7, 8);
3466 compare_dump(reporter, p, false, false, "path.moveTo(1, 2);\n" 3466 compare_dump(reporter, p, false, false, "path.moveTo(1, 2);\n"
3467 "path.cubicTo(3, 4, 5, 6, 7, 8);\n") ; 3467 "path.cubicTo(3, 4, 5, 6, 7, 8);\n") ;
3468 p.reset(); 3468 p.reset();
3469 p.moveTo(1, 2); 3469 p.moveTo(1, 2);
3470 p.lineTo(3, 4); 3470 p.lineTo(3, 4);
3471 compare_dump(reporter, p, false, true, "path.moveTo(SkBits2Float(0x3f800000 ), SkBits2Float(0x40000000));\n" 3471 compare_dump(reporter, p, false, true,
3472 "path.lineTo(SkBits2Float(0x40400000 ), SkBits2Float(0x40800000));\n"); 3472 "path.moveTo(SkBits2Float(0x3f800000), SkBits2Float(0x40000000) ); // 1, 2\n"
3473 "path.lineTo(SkBits2Float(0x40400000), SkBits2Float(0x40800000) ); // 3, 4\n");
3473 p.reset(); 3474 p.reset();
3474 p.moveTo(SkBits2Float(0x3f800000), SkBits2Float(0x40000000)); 3475 p.moveTo(SkBits2Float(0x3f800000), SkBits2Float(0x40000000));
3475 p.lineTo(SkBits2Float(0x40400000), SkBits2Float(0x40800000)); 3476 p.lineTo(SkBits2Float(0x40400000), SkBits2Float(0x40800000));
3476 compare_dump(reporter, p, false, false, "path.moveTo(1, 2);\n" 3477 compare_dump(reporter, p, false, false, "path.moveTo(1, 2);\n"
3477 "path.lineTo(3, 4);\n"); 3478 "path.lineTo(3, 4);\n");
3478 } 3479 }
3479 3480
3480 class PathTest_Private { 3481 class PathTest_Private {
3481 public: 3482 public:
3482 static void TestPathTo(skiatest::Reporter* reporter) { 3483 static void TestPathTo(skiatest::Reporter* reporter) {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
3622 test_addEmptyPath(reporter, SkPath::kExtend_AddPathMode); 3623 test_addEmptyPath(reporter, SkPath::kExtend_AddPathMode);
3623 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode); 3624 test_addEmptyPath(reporter, SkPath::kAppend_AddPathMode);
3624 test_conicTo_special_case(reporter); 3625 test_conicTo_special_case(reporter);
3625 test_get_point(reporter); 3626 test_get_point(reporter);
3626 test_contains(reporter); 3627 test_contains(reporter);
3627 PathTest_Private::TestPathTo(reporter); 3628 PathTest_Private::TestPathTo(reporter);
3628 PathRefTest_Private::TestPathRef(reporter); 3629 PathRefTest_Private::TestPathRef(reporter);
3629 test_dump(reporter); 3630 test_dump(reporter);
3630 test_path_crbugskia2820(reporter); 3631 test_path_crbugskia2820(reporter);
3631 } 3632 }
OLDNEW
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698