From a6e6296ce3e27579b9a1e42089b76bc248428f4e Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 31 Oct 2011 14:31:01 +1000 Subject: 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 --- tests/auto/corelib/tools/qstring/tst_qstring.cpp | 49 ------------------------ 1 file changed, 49 deletions(-) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index 107de9b727..0bf1c8607a 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -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 ); -- cgit v1.2.3