OLD | NEW |
1 #include "Test.h" | 1 #include "Test.h" |
2 | 2 |
3 #include "SkRecord.h" | 3 #include "SkRecord.h" |
4 #include "SkRecordPattern.h" | 4 #include "SkRecordPattern.h" |
5 #include "SkRecorder.h" | 5 #include "SkRecorder.h" |
6 #include "SkRecords.h" | 6 #include "SkRecords.h" |
7 | 7 |
8 using namespace SkRecords; | 8 using namespace SkRecords; |
9 typedef Pattern3<Is<Save>, | 9 typedef Pattern3<Is<Save>, |
10 Is<ClipRect>, | 10 Is<ClipRect>, |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 REPORTER_ASSERT(r, pattern.search(&record, &begin, &end)); | 183 REPORTER_ASSERT(r, pattern.search(&record, &begin, &end)); |
184 REPORTER_ASSERT(r, begin == 6); | 184 REPORTER_ASSERT(r, begin == 6); |
185 REPORTER_ASSERT(r, end == 9); | 185 REPORTER_ASSERT(r, end == 9); |
186 | 186 |
187 REPORTER_ASSERT(r, pattern.search(&record, &begin, &end)); | 187 REPORTER_ASSERT(r, pattern.search(&record, &begin, &end)); |
188 REPORTER_ASSERT(r, begin == 13); | 188 REPORTER_ASSERT(r, begin == 13); |
189 REPORTER_ASSERT(r, end == 19); | 189 REPORTER_ASSERT(r, end == 19); |
190 | 190 |
191 REPORTER_ASSERT(r, !pattern.search(&record, &begin, &end)); | 191 REPORTER_ASSERT(r, !pattern.search(&record, &begin, &end)); |
192 } | 192 } |
| 193 |
| 194 DEF_TEST(RecordPattern_SaveLayerIsNotADraw, r) { |
| 195 Pattern1<IsDraw> pattern; |
| 196 |
| 197 SkRecord record; |
| 198 SkRecorder recorder(SkRecorder::kWriteOnly_Mode, &record, 1920, 1200); |
| 199 recorder.saveLayer(NULL, NULL); |
| 200 |
| 201 REPORTER_ASSERT(r, !pattern.match(&record, 0)); |
| 202 } |
OLD | NEW |