Skip to content

Commit a943081

Browse files
committed
Add comments about the purpose of the test, and about the static assert.
1 parent cc0bbb3 commit a943081

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/offset_range.pass.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
// <fstream>
1010

11+
// Test that we can seek using offsets larger than 32 bit, and that we can
12+
// retrieve file offsets larger than 32 bit.
13+
1114
// XFAIL: target={{.*}}-windows{{.*}}
1215

1316
#include <fstream>
@@ -60,6 +63,8 @@ void test_tellg(std::streamoff total_size) {
6063
}
6164

6265
int main(int, char**) {
66+
// This test assumes and requires that std::streamoff is larger than
67+
// 32 bit - this is not required in the standard itself.
6368
static_assert(sizeof(std::streamoff) > 4);
6469
test_tellg(0x100000042ULL);
6570
return 0;

0 commit comments

Comments
 (0)