Remove disabled code from QString autotest.

The removed code was disabled before the tests were imported into the Qt
repository in 2006, so its meaning or usefulness is lost in the mists of
time.

Change-Id: I3108a1a1d86cd135886608f47dcd88bf49f2d3fd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-10-31 14:31:01 +10:00 committed by Qt by Nokia
parent 2e8b151049
commit a6e6296ce3

View File

@ -1756,19 +1756,6 @@ void tst_QString::append()
QString a;
a = "<>ABCABCABCABC";
QCOMPARE(a.append(">"),(QString)"<>ABCABCABCABC>");
#if 0
#if !defined(QT_NO_STL)
/*
The std::string support is fairly trivial in itself. The major
problem is whether it compiles or not, because of the way
different compilers choose an overload based on the type of the
argument. If it compiles, we're happy.
*/
std::string stroustrup;
a.append( stroustrup );
a += stroustrup;
#endif
#endif
}
void tst_QString::append_bytearray_data()
@ -1782,19 +1769,7 @@ void tst_QString::append_bytearray_data()
ba[1] = 'b';
ba[2] = 'c';
ba[3] = 'd';
#if 0
ba[4] = 0;
for ( int i=0; i<2; i++ ) {
// i == 0: the byte array is exactly strlen+1
// i == 1: the byte array is larger than strlen+1
QTest::newRow( QString("nullTerminated_%1_0").arg(i) ) << QString() << ba << QString("abcd");
QTest::newRow( QString("nullTerminated_%1_1").arg(i) ) << QString("") << ba << QString("abcd");
QTest::newRow( QString("nullTerminated_%1_2").arg(i) ) << QString("foobar ") << ba << QString("foobar abcd");
ba.resize( 8 );
}
#endif
// no 0 termination
ba.resize( 4 );
QTest::newRow( "notTerminated_0" ) << QString() << ba << QString("abcd");
@ -1877,12 +1852,6 @@ void tst_QString::prepend()
QString a;
a = "<>ABCABCABCABC>";
QCOMPARE(a.prepend("-"),(QString)"-<>ABCABCABCABC>");
#if 0
#if !defined(QT_NO_STL)
std::string stroustrup;
a.prepend( stroustrup );
#endif
#endif
}
void tst_QString::prepend_bytearray_data()
@ -1896,24 +1865,6 @@ void tst_QString::prepend_bytearray_data()
ba[1] = 'b';
ba[2] = 'c';
ba[3] = 'd';
#if 0
ba[4] = 0;
for ( int i=0; i<2; i++ ) {
// i == 0: the byte array is exactly strlen+1
// i == 1: the byte array is larger than strlen+1
QTest::newRow( QString("nullTerminated_%1_0").arg(i) ) << QString() << ba << QString("abcd");
QTest::newRow( QString("nullTerminated_%1_1").arg(i) ) << QString("") << ba << QString("abcd");
QTest::newRow( QString("nullTerminated_%1_2").arg(i) ) << QString(" foobar") << ba << QString("abcd foobar");
ba.resize( 8 );
}
// no 0 termination
ba.resize( 4 );
QTest::newRow( "notTerminated_0" ) << QString() << ba << QString("abcd");
QTest::newRow( "notTerminated_1" ) << QString("") << ba << QString("abcd");
QTest::newRow( "notTerminated_2" ) << QString(" foobar") << ba << QString("abcd foobar");
#endif
// byte array with only a 0
ba.resize( 1 );