text
stringlengths
0
2.2M
const Container XRE;
const Container XCRE;
const Container XS;
const Container XSS;
ASSERTV(mXB.functionCalled(), ! mXB.beginCalled() );
ASSERTV( XB.functionCalled(), ! XB.constBeginCalled() );
ASSERTV( XCB.functionCalled(), ! XCB.constBeginCalled() );
ASSERTV(mXRB.functionCalled(), ! mXRB.reverseBeginCalled() );
ASSERTV( XRB.functionCalled(), ! XRB.constReverseBeginCalled() );
ASSERTV( XCRB.functionCalled(),! XCRB.constReverseBeginCalled());
ASSERTV(mXE.functionCalled(), ! mXE.endCalled() );
ASSERTV( XE.functionCalled(), ! XE.constEndCalled() );
ASSERTV( XCE.functionCalled(), ! XCE.constEndCalled() );
ASSERTV(mXRE.functionCalled(), ! mXRE.reverseEndCalled() );
ASSERTV( XRE.functionCalled(), ! XRE.constReverseEndCalled() );
ASSERTV( XCRE.functionCalled(),! XCRE.constReverseEndCalled());
ASSERTV( XS .functionCalled(), ! XS .sizeCalled());
ASSERTV( XSS.functionCalled(), ! XSS.sizeCalled());
#ifndef BSLS_PLATFORM_CMP_SUN
// Sun compiler is not able to distinguish
// isConstIterator<Container>(const int*) from
// isConstIterator<Container>(int*) or
// isConstReverseIterator<Cont>(bsl::reverse_iterator<const int*>)
// from isConstReverseIterator<Cont>(bsl::reverse_iterator<int*>),
// so the following test scenarios are excluded for it.
ASSERT(!isConstIterator <Container>((bsl::begin (mXB ))));
ASSERT( isConstIterator <Container>((bsl::begin ( XB ))));
ASSERT( isConstIterator <Container>((bsl::cbegin ( XCB ))));
ASSERT(!isConstReverseIterator<Container>((bsl::rbegin (mXRB ))));
ASSERT( isConstReverseIterator<Container>((bsl::rbegin ( XRB ))));
ASSERT( isConstReverseIterator<Container>((bsl::crbegin( XCRB))));
ASSERT(!isConstIterator <Container>((bsl::end (mXE ))));
ASSERT( isConstIterator <Container>((bsl::end ( XE ))));
ASSERT( isConstIterator <Container>((bsl::cend ( XCE ))));
ASSERT(!isConstReverseIterator<Container>((bsl::rend (mXRE ))));
ASSERT( isConstReverseIterator<Container>((bsl::rend ( XRE ))));
ASSERT( isConstReverseIterator<Container>((bsl::crend( XCRE))));
#endif
iterator mXBIt = bsl::begin (mXB );
const_iterator XBIt = bsl::begin ( XB );
const_iterator XCBIt = bsl::cbegin ( XCB );
reverse_iterator mXRBIt = bsl::rbegin (mXRB );
const_reverse_iterator XRBIt = bsl::rbegin ( XRB );
const_reverse_iterator XCRBIt = bsl::crbegin( XCRB);
iterator mXEIt = bsl::end (mXE );
const_iterator XEIt = bsl::end ( XE );
const_iterator XCEIt = bsl::cend ( XCE );
reverse_iterator mXREIt = bsl::rend (mXRE );
const_reverse_iterator XREIt = bsl::rend ( XRE );
const_reverse_iterator XCREIt = bsl::crend( XCRE);
ASSERT(1 == bsl::size(XS));
ASSERT(1 == bsl::ssize(XSS));
ASSERTV(mXB.functionCalled(), mXB.beginCalled() );
ASSERTV( XB.functionCalled(), XB.constBeginCalled() );
ASSERTV( XCB.functionCalled(), XCB.constBeginCalled() );
ASSERTV(mXRB.functionCalled(), mXRB.reverseBeginCalled() );
ASSERTV( XRB.functionCalled(), XRB.constReverseBeginCalled() );
ASSERTV( XCRB.functionCalled(), XCRB.constReverseBeginCalled());
ASSERTV(mXE.functionCalled(), mXE.endCalled() );
ASSERTV( XE.functionCalled(), XE.constEndCalled() );
ASSERTV( XCE.functionCalled(), XCE.constEndCalled() );
ASSERTV(mXRE.functionCalled(), mXRE.reverseEndCalled() );
ASSERTV( XRE.functionCalled(), XRE.constReverseEndCalled() );
ASSERTV( XCRE.functionCalled(), XCRE.constReverseEndCalled());
ASSERTV( XS .functionCalled(), XS .sizeCalled());
ASSERTV( XSS.functionCalled(), XSS.sizeCalled());
ASSERT(mXB.begin() == mXBIt );
ASSERT( XB.begin() == XBIt );
ASSERT( XCB.begin() == XCBIt );
ASSERT(mXRB.rbegin() == mXRBIt );
ASSERT( XRB.rbegin() == XRBIt );
ASSERT( XCRB.rbegin() == XCRBIt);
ASSERT(mXE.end() == mXEIt);
ASSERT( XE.end() == XEIt);
ASSERT( XCE.end() == XCEIt );
ASSERT(mXRE.rend() == mXREIt );
ASSERT( XRE.rend() == XREIt );
ASSERT( XCRE.rend() == XCREIt);
}
if (verbose) printf("\tTest arrays.\n");
{
int mX1[] = {1};
const int X1[] = {1};
int mX2[] = {1, 2};