aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-09-12 12:23:49 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-09-12 12:55:29 +0200
commitfa19c914f7fe7be127c0fb330b41ff7c091f40aa (patch)
treef399ed252fb304ee48556cef85e860deb4ca1ffb /src/test
parentfa2f2413b87f5fc1e5c92bf510beebdcd0091714 (diff)
downloadbitcoin-fa19c914f7fe7be127c0fb330b41ff7c091f40aa.tar.xz
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-
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/buffered_file.cpp2
-rw-r--r--src/test/streams_tests.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/fuzz/buffered_file.cpp b/src/test/fuzz/buffered_file.cpp
index 47aa7e1660..1116274e3d 100644
--- a/src/test/fuzz/buffered_file.cpp
+++ b/src/test/fuzz/buffered_file.cpp
@@ -18,7 +18,7 @@ FUZZ_TARGET(buffered_file)
{
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
FuzzedFileProvider fuzzed_file_provider = ConsumeFile(fuzzed_data_provider);
- std::optional<CBufferedFile> opt_buffered_file;
+ std::optional<BufferedFile> opt_buffered_file;
FILE* fuzzed_file = fuzzed_file_provider.open();
try {
opt_buffered_file.emplace(fuzzed_file, fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096), fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096), fuzzed_data_provider.ConsumeIntegral<int>());
diff --git a/src/test/streams_tests.cpp b/src/test/streams_tests.cpp
index 02add89ab9..99740ee779 100644
--- a/src/test/streams_tests.cpp
+++ b/src/test/streams_tests.cpp
@@ -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) {