Skip to content

Commit 1683503

Browse files
committed
Don't use lambdas in TEST_REQUIRE
The macOS C++03 test configuration disallows lambdas in C++03.
1 parent 4f202ce commit 1683503

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,16 @@ void test_tellg(std::streamoff total_size) {
4444
ifs.open(p, std::ios::binary);
4545
assert(ifs.is_open());
4646
std::streamoff in_off = ifs.tellg();
47-
TEST_REQUIRE(in_off == 0, [&] { test_eprintf("in_off = %ld\n", in_off); });
47+
TEST_REQUIRE(in_off == 0, "in_off not zero at start");
4848
ifs.seekg(total_size - 20, std::ios::beg);
4949
in_off = ifs.tellg();
50-
TEST_REQUIRE(in_off == total_size - 20, [&] {
51-
test_eprintf("ref = %zu, in_off = %ld\n", total_size - 20, in_off);
52-
});
50+
TEST_REQUIRE(in_off == total_size - 20, "in_off incorrect after >32 bit seek");
5351
ifs.seekg(10, std::ios::cur);
5452
in_off = ifs.tellg();
55-
TEST_REQUIRE(in_off == total_size - 10, [&] {
56-
test_eprintf("ref = %zu, in_off = %ld\n", total_size - 10, in_off);
57-
});
53+
TEST_REQUIRE(in_off == total_size - 10, "in_off incorrect after incremental seek");
5854
ifs.seekg(0, std::ios::end);
5955
in_off = ifs.tellg();
60-
TEST_REQUIRE(in_off == total_size, [&] { test_eprintf("ref = %zu, in_off = %ld\n", total_size, in_off); });
56+
TEST_REQUIRE(in_off == total_size, "in_off incorrect after seek to end");
6157
}
6258
std::remove(p.c_str());
6359
}

0 commit comments

Comments
 (0)