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

Side by Side Diff: tests/ScaleToSidesTest.cpp

Issue 1717743004: Fix asserts found in SampleApp and update the tests with additional interesting numbers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove include used for debug. Created 4 years, 10 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/SkScaleToSides.h ('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 2016 Google Inc. 2 * Copyright 2016 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 "SkScaleToSides.h" 8 #include "SkScaleToSides.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include "Test.h" 11 #include "Test.h"
12 12
13 DEF_TEST(ScaleToSides, reporter) { 13 DEF_TEST(ScaleToSides, reporter) {
14 double interestingValues[] = { 14 double interestingValues[] = {
15 // From sample app - PathFuzzer
16 260.01662826538085938,
17 63.61007690429687500,
18 795.98901367187500000,
19 217.71697616577148438,
20 686.15960693359375000,
21 556.57641601562500000,
15 // From skp bitbucket 22 // From skp bitbucket
16 111.60000228881836, 23 111.60000228881836,
17 55.800003051757813, 24 55.800003051757813,
18 0.99999996581812677920, 25 0.99999996581812677920,
19 0.0, 26 0.0,
20 0.5, 27 0.5,
21 1.0, 28 1.0,
22 2.0, 29 2.0,
23 3.0, 30 3.0,
24 33.0, 31 33.0,
(...skipping 24 matching lines...) Expand all
49 } 56 }
50 if (scale < 1.0 && scale > 0.0) { 57 if (scale < 1.0 && scale > 0.0) {
51 SkScaleToSides::AdjustRadii(width, scale, &radius1, &radius2); 58 SkScaleToSides::AdjustRadii(width, scale, &radius1, &radius2);
52 } 59 }
53 } 60 }
54 } 61 }
55 } 62 }
56 } 63 }
57 } 64 }
58 } 65 }
OLDNEW
« no previous file with comments | « src/core/SkScaleToSides.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698