HomePhabricator

[libcxx] [test] Remove non-portable assertions from filebuf tests

Description

[libcxx] [test] Remove non-portable assertions from filebuf tests

seekoff.pass.cpp:
libc++'s tests are asserting things about the buffer passed to pubsetbuf. [filebuf.virtuals]/12 says that what the filebuf does with the buffer you give it is completely implementation defined. The MSVC++ implementation takes that buffer and hands it off to the CRT (by calling ::setvbuf) and the CRT doesn't necessarily follow the pattern this test wants.
This change simply makes asserts against the buffer's contents use LIBCPP_ASSERT instead of assert.

pbackfail.pass.cpp:
libc++'s tests are asserting about what characters will and will not be available in the putback area. [filebuf.virtuals]/9 says "The function can alter the number of putback positions available as a result of any call." This change LIBCPP_ASSERTS libc++'s behavior, but checks invariants of the putback area independently.

Details

Committed
bionApr 26 2018, 3:18 PM
Parents
rL330998: [Docs] Escape the @ symbol, so that it appears in documentation output. [NFC]
Branches
Unknown
Tags
Unknown