OLD | NEW |
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 "Test.h" | 8 #include "Test.h" |
9 #include "SkRasterPipeline.h" | 9 #include "SkRasterPipeline.h" |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 p.append(store, store_tail, dst_vals); | 78 p.append(store, store_tail, dst_vals); |
79 | 79 |
80 p.run(5); | 80 p.run(5); |
81 | 81 |
82 REPORTER_ASSERT(r, dst_vals[0] == 1); | 82 REPORTER_ASSERT(r, dst_vals[0] == 1); |
83 REPORTER_ASSERT(r, dst_vals[1] == 4); | 83 REPORTER_ASSERT(r, dst_vals[1] == 4); |
84 REPORTER_ASSERT(r, dst_vals[2] == 9); | 84 REPORTER_ASSERT(r, dst_vals[2] == 9); |
85 REPORTER_ASSERT(r, dst_vals[3] == 16); | 85 REPORTER_ASSERT(r, dst_vals[3] == 16); |
86 REPORTER_ASSERT(r, dst_vals[4] == 25); | 86 REPORTER_ASSERT(r, dst_vals[4] == 25); |
87 } | 87 } |
| 88 |
| 89 DEF_TEST(SkRasterPipeline_empty, r) { |
| 90 // No asserts... just a test that this is safe to run. |
| 91 SkRasterPipeline p; |
| 92 p.run(20); |
| 93 } |
| 94 |
| 95 DEF_TEST(SkRasterPipeline_nonsense, r) { |
| 96 // No asserts... just a test that this is safe to run and terminates. |
| 97 // square() always calls st->next(); this makes sure we've always got someth
ing there to call. |
| 98 SkRasterPipeline p; |
| 99 p.append(square); |
| 100 p.run(20); |
| 101 } |
OLD | NEW |