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

Side by Side Diff: tests/ValueTest.cpp

Issue 1585813004: SkValue: SkXfermode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: space Created 4 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
« no previous file with comments | « src/effects/SkToFromValue.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 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 "SkData.h" 8 #include "SkData.h"
9 #include "SkMatrix.h" 9 #include "SkMatrix.h"
10 #include "SkValue.h" 10 #include "SkToFromValue.h"
11 #include "Test.h" 11 #include "Test.h"
12 12
13 static const SkValue::Type example_type = 13 static const SkValue::Type example_type =
14 SkValue::Type(SkValue::kMaxPublicObject + 1); 14 SkValue::Type(SkValue::kMaxPublicObject + 1);
15 15
16 enum { kExampleS32, kExampleF32, kExampleU32, kExampleObject, kExampleBytes, 16 enum { kExampleS32, kExampleF32, kExampleU32, kExampleObject, kExampleBytes,
17 kExampleF32s, kExampleU32s, kExampleU16s, kExampleArray }; 17 kExampleF32s, kExampleU32s, kExampleU16s, kExampleArray };
18 18
19 static const uint16_t aU16[] = { 1, 2, 3, 4 }; 19 static const uint16_t aU16[] = { 1, 2, 3, 4 };
20 static const uint32_t aU32[] = { 5, 6, 7, 8 }; 20 static const uint32_t aU32[] = { 5, 6, 7, 8 };
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 val.foreach(fn); 102 val.foreach(fn);
103 } 103 }
104 104
105 DEF_TEST(Value_Matrix, r) { 105 DEF_TEST(Value_Matrix, r) {
106 auto m = SkMatrix::MakeTrans(900.0f, 1000.0f); 106 auto m = SkMatrix::MakeTrans(900.0f, 1000.0f);
107 auto val = SkToValue(m); 107 auto val = SkToValue(m);
108 SkMatrix dst; 108 SkMatrix dst;
109 REPORTER_ASSERT(r, SkFromValue(val, &dst)); 109 REPORTER_ASSERT(r, SkFromValue(val, &dst));
110 REPORTER_ASSERT(r, dst == m); 110 REPORTER_ASSERT(r, dst == m);
111 } 111 }
OLDNEW
« no previous file with comments | « src/effects/SkToFromValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698