| OLD | NEW |
| 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 "SkData.h" | 8 #include "SkData.h" |
| 9 #include "SkDataTable.h" | 9 #include "SkDataTable.h" |
| 10 #include "SkOSFile.h" | 10 #include "SkOSFile.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 321 |
| 322 SkAutoTUnref<SkROBuffer> roBuffer(buffer.newRBufferSnapshot()); | 322 SkAutoTUnref<SkROBuffer> roBuffer(buffer.newRBufferSnapshot()); |
| 323 SkROBuffer::Iter iter(roBuffer); | 323 SkROBuffer::Iter iter(roBuffer); |
| 324 REPORTER_ASSERT(r, iter.data()); | 324 REPORTER_ASSERT(r, iter.data()); |
| 325 REPORTER_ASSERT(r, iter.size() == 26); | 325 REPORTER_ASSERT(r, iter.size() == 26); |
| 326 | 326 |
| 327 // There is only one block in this buffer. | 327 // There is only one block in this buffer. |
| 328 REPORTER_ASSERT(r, !iter.next()); | 328 REPORTER_ASSERT(r, !iter.next()); |
| 329 REPORTER_ASSERT(r, 0 == iter.size()); | 329 REPORTER_ASSERT(r, 0 == iter.size()); |
| 330 } | 330 } |
| 331 |
| 332 // Tests that it is safe to destruct an SkRWBuffer without appending |
| 333 // anything to it. |
| 334 DEF_TEST(RWBuffer_noAppend, r) { |
| 335 SkRWBuffer buffer; |
| 336 REPORTER_ASSERT(r, 0 == buffer.size()); |
| 337 } |
| OLD | NEW |