Skip to content

Commit fbee925

Browse files
committed
[mongocxx/gridfs/utest] Add a unit test to ensure limit value
1 parent 96d3bb4 commit fbee925

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/mongocxx/test/gridfs/bucket.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,12 @@ TEST_CASE("gridfs::bucket::download_to_stream works", "[gridfs::bucket]") {
938938
static_cast<std::size_t>(end));
939939
}
940940

941+
SECTION("across 2 chunks at the end") {
942+
const auto start = chunk_size - 1;
943+
const auto end = start + chunk_size - 1;
944+
check_downloaded_content(static_cast<std::size_t>(start),
945+
static_cast<std::size_t>(end));
946+
}
941947
SECTION("across 3 chunks") {
942948
const auto start = chunk_size / 2;
943949
const auto end = start + 2 * chunk_size;

0 commit comments

Comments
 (0)