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

Unified Diff: tests/StreamTest.cpp

Issue 1703293002: Remove position from FrontBufferedStream (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix test_peeking_front_buffered_stream 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/FrontBufferedStreamTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/StreamTest.cpp
diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp
index 15ebfcf07d63bc29345fbcac227fd3e803eb5091..2a60a7b10f921dd6988e75cea280ff1a61ab06fa 100644
--- a/tests/StreamTest.cpp
+++ b/tests/StreamTest.cpp
@@ -266,12 +266,11 @@ static void test_peeking_front_buffered_stream(skiatest::Reporter* r,
for (size_t start = 0; start <= bufferSize; start++) {
// Skip to the starting point
REPORTER_ASSERT(r, bufferedStream->skip(start) == start);
- REPORTER_ASSERT(r, bufferedStream->getPosition() == start);
const size_t bytesPeeked = bufferedStream->peek(peekStorage.get(), bytesToPeek);
if (0 == bytesPeeked) {
- // Peeking should only fail completely if we have read beyond the buffer.
- REPORTER_ASSERT(r, bufferedStream->getPosition() >= bufferSize);
+ // Peeking should only fail completely if we have read/skipped beyond the buffer.
+ REPORTER_ASSERT(r, start >= bufferSize);
break;
}
« no previous file with comments | « tests/FrontBufferedStreamTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698