mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-10 06:39:15 +02:00
scripted-diff: Rename CBufferedFile to BufferedFile
While touching all constructors in the previous commit, the class name can be adjusted to comply with the style guide. -BEGIN VERIFY SCRIPT- sed -i 's/CBufferedFile/BufferedFile/g' $( git grep -l CBufferedFile ) -END VERIFY SCRIPT-
This commit is contained in:
@@ -260,7 +260,7 @@ BOOST_AUTO_TEST_CASE(streams_buffered_file)
|
||||
// The buffer size (second arg) must be greater than the rewind
|
||||
// amount (third arg).
|
||||
try {
|
||||
CBufferedFile bfbad{file, 25, 25, 333};
|
||||
BufferedFile bfbad{file, 25, 25, 333};
|
||||
BOOST_CHECK(false);
|
||||
} catch (const std::exception& e) {
|
||||
BOOST_CHECK(strstr(e.what(),
|
||||
@@ -268,7 +268,7 @@ BOOST_AUTO_TEST_CASE(streams_buffered_file)
|
||||
}
|
||||
|
||||
// The buffer is 25 bytes, allow rewinding 10 bytes.
|
||||
CBufferedFile bf{file, 25, 10, 333};
|
||||
BufferedFile bf{file, 25, 10, 333};
|
||||
BOOST_CHECK(!bf.eof());
|
||||
|
||||
// This member has no functional effect.
|
||||
@@ -356,7 +356,7 @@ BOOST_AUTO_TEST_CASE(streams_buffered_file)
|
||||
BOOST_CHECK(false);
|
||||
} catch (const std::exception& e) {
|
||||
BOOST_CHECK(strstr(e.what(),
|
||||
"CBufferedFile::Fill: end of file") != nullptr);
|
||||
"BufferedFile::Fill: end of file") != nullptr);
|
||||
}
|
||||
// Attempting to read beyond the end sets the EOF indicator.
|
||||
BOOST_CHECK(bf.eof());
|
||||
@@ -391,7 +391,7 @@ BOOST_AUTO_TEST_CASE(streams_buffered_file_skip)
|
||||
rewind(file);
|
||||
|
||||
// The buffer is 25 bytes, allow rewinding 10 bytes.
|
||||
CBufferedFile bf{file, 25, 10, 333};
|
||||
BufferedFile bf{file, 25, 10, 333};
|
||||
|
||||
uint8_t i;
|
||||
// This is like bf >> (7-byte-variable), in that it will cause data
|
||||
@@ -445,7 +445,7 @@ BOOST_AUTO_TEST_CASE(streams_buffered_file_rand)
|
||||
|
||||
size_t bufSize = InsecureRandRange(300) + 1;
|
||||
size_t rewindSize = InsecureRandRange(bufSize);
|
||||
CBufferedFile bf{file, bufSize, rewindSize, 333};
|
||||
BufferedFile bf{file, bufSize, rewindSize, 333};
|
||||
size_t currentPos = 0;
|
||||
size_t maxPos = 0;
|
||||
for (int step = 0; step < 100; ++step) {
|
||||
|
||||
Reference in New Issue
Block a user