diff options
Diffstat (limited to 'tests/auto/corelib/io/qbuffer')
-rw-r--r-- | tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp | 133 |
1 files changed, 67 insertions, 66 deletions
diff --git a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp index 832d7ee063..c65da128bf 100644 --- a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp +++ b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp @@ -203,72 +203,73 @@ void tst_QBuffer::writeBlock_data() QTest::addColumn<QString>("str"); QTest::newRow( "small_bytearray" ) << QString("Test"); - QTest::newRow( "large_bytearray" ) << QString("The QBuffer class is an I/O device that operates on a QByteArray.\n" - "QBuffer is used to read and write to a memory buffer. It is normally " - "used with a QTextStream or a QDataStream. QBuffer has an associated " - "QByteArray which holds the buffer data. The size() of the buffer is " - "automatically adjusted as data is written.\n" - "The constructor QBuffer(QByteArray) creates a QBuffer using an existing " - "byte array. The byte array can also be set with setBuffer(). Writing to " - "the QBuffer will modify the original byte array because QByteArray is " - "explicitly shared.\n" - "Use open() to open the buffer before use and to set the mode (read-only, " - "write-only, etc.). close() closes the buffer. The buffer must be closed " - "before reopening or calling setBuffer().\n" - "A common way to use QBuffer is through QDataStream or QTextStream, which " - "have constructors that take a QBuffer parameter. For convenience, there " - "are also QDataStream and QTextStream constructors that take a QByteArray " - "parameter. These constructors create and open an internal QBuffer.\n" - "Note that QTextStream can also operate on a QString (a Unicode string); a " - "QBuffer cannot.\n" - "You can also use QBuffer directly through the standard QIODevice functions " - "readBlock(), writeBlock() readLine(), at(), getch(), putch() and ungetch().\n" - "See also QFile, QDataStream, QTextStream, QByteArray, Shared Classes, Collection " - "Classes and Input/Output and Networking.\n\n" - "The QBuffer class is an I/O device that operates on a QByteArray.\n" - "QBuffer is used to read and write to a memory buffer. It is normally " - "used with a QTextStream or a QDataStream. QBuffer has an associated " - "QByteArray which holds the buffer data. The size() of the buffer is " - "automatically adjusted as data is written.\n" - "The constructor QBuffer(QByteArray) creates a QBuffer using an existing " - "byte array. The byte array can also be set with setBuffer(). Writing to " - "the QBuffer will modify the original byte array because QByteArray is " - "explicitly shared.\n" - "Use open() to open the buffer before use and to set the mode (read-only, " - "write-only, etc.). close() closes the buffer. The buffer must be closed " - "before reopening or calling setBuffer().\n" - "A common way to use QBuffer is through QDataStream or QTextStream, which " - "have constructors that take a QBuffer parameter. For convenience, there " - "are also QDataStream and QTextStream constructors that take a QByteArray " - "parameter. These constructors create and open an internal QBuffer.\n" - "Note that QTextStream can also operate on a QString (a Unicode string); a " - "QBuffer cannot.\n" - "You can also use QBuffer directly through the standard QIODevice functions " - "readBlock(), writeBlock() readLine(), at(), getch(), putch() and ungetch().\n" - "See also QFile, QDataStream, QTextStream, QByteArray, Shared Classes, Collection " - "Classes and Input/Output and Networking.\n\n" - "The QBuffer class is an I/O device that operates on a QByteArray.\n" - "QBuffer is used to read and write to a memory buffer. It is normally " - "used with a QTextStream or a QDataStream. QBuffer has an associated " - "QByteArray which holds the buffer data. The size() of the buffer is " - "automatically adjusted as data is written.\n" - "The constructor QBuffer(QByteArray) creates a QBuffer using an existing " - "byte array. The byte array can also be set with setBuffer(). Writing to " - "the QBuffer will modify the original byte array because QByteArray is " - "explicitly shared.\n" - "Use open() to open the buffer before use and to set the mode (read-only, " - "write-only, etc.). close() closes the buffer. The buffer must be closed " - "before reopening or calling setBuffer().\n" - "A common way to use QBuffer is through QDataStream or QTextStream, which " - "have constructors that take a QBuffer parameter. For convenience, there " - "are also QDataStream and QTextStream constructors that take a QByteArray " - "parameter. These constructors create and open an internal QBuffer.\n" - "Note that QTextStream can also operate on a QString (a Unicode string); a " - "QBuffer cannot.\n" - "You can also use QBuffer directly through the standard QIODevice functions " - "readBlock(), writeBlock() readLine(), at(), getch(), putch() and ungetch().\n" - "See also QFile, QDataStream, QTextStream, QByteArray, Shared Classes, Collection " - "Classes and Input/Output and Networking."); + QTest::newRow( "large_bytearray" ) << QString( + "The QBuffer class is an I/O device that operates on a QByteArray.\n" + "QBuffer is used to read and write to a memory buffer. It is normally " + "used with a QTextStream or a QDataStream. QBuffer has an associated " + "QByteArray which holds the buffer data. The size() of the buffer is " + "automatically adjusted as data is written.\n" + "The constructor QBuffer(QByteArray) creates a QBuffer using an existing " + "byte array. The byte array can also be set with setBuffer(). Writing to " + "the QBuffer will modify the original byte array because QByteArray is " + "explicitly shared.\n" + "Use open() to open the buffer before use and to set the mode (read-only, " + "write-only, etc.). close() closes the buffer. The buffer must be closed " + "before reopening or calling setBuffer().\n" + "A common way to use QBuffer is through QDataStream or QTextStream, which " + "have constructors that take a QBuffer parameter. For convenience, there " + "are also QDataStream and QTextStream constructors that take a QByteArray " + "parameter. These constructors create and open an internal QBuffer.\n" + "Note that QTextStream can also operate on a QString (a Unicode string); a " + "QBuffer cannot.\n" + "You can also use QBuffer directly through the standard QIODevice functions " + "readBlock(), writeBlock() readLine(), at(), getch(), putch() and ungetch().\n" + "See also QFile, QDataStream, QTextStream, QByteArray, Shared Classes, Collection " + "Classes and Input/Output and Networking.\n\n" + "The QBuffer class is an I/O device that operates on a QByteArray.\n" + "QBuffer is used to read and write to a memory buffer. It is normally " + "used with a QTextStream or a QDataStream. QBuffer has an associated " + "QByteArray which holds the buffer data. The size() of the buffer is " + "automatically adjusted as data is written.\n" + "The constructor QBuffer(QByteArray) creates a QBuffer using an existing " + "byte array. The byte array can also be set with setBuffer(). Writing to " + "the QBuffer will modify the original byte array because QByteArray is " + "explicitly shared.\n" + "Use open() to open the buffer before use and to set the mode (read-only, " + "write-only, etc.). close() closes the buffer. The buffer must be closed " + "before reopening or calling setBuffer().\n" + "A common way to use QBuffer is through QDataStream or QTextStream, which " + "have constructors that take a QBuffer parameter. For convenience, there " + "are also QDataStream and QTextStream constructors that take a QByteArray " + "parameter. These constructors create and open an internal QBuffer.\n" + "Note that QTextStream can also operate on a QString (a Unicode string); a " + "QBuffer cannot.\n" + "You can also use QBuffer directly through the standard QIODevice functions " + "readBlock(), writeBlock() readLine(), at(), getch(), putch() and ungetch().\n" + "See also QFile, QDataStream, QTextStream, QByteArray, Shared Classes, Collection " + "Classes and Input/Output and Networking.\n\n" + "The QBuffer class is an I/O device that operates on a QByteArray.\n" + "QBuffer is used to read and write to a memory buffer. It is normally " + "used with a QTextStream or a QDataStream. QBuffer has an associated " + "QByteArray which holds the buffer data. The size() of the buffer is " + "automatically adjusted as data is written.\n" + "The constructor QBuffer(QByteArray) creates a QBuffer using an existing " + "byte array. The byte array can also be set with setBuffer(). Writing to " + "the QBuffer will modify the original byte array because QByteArray is " + "explicitly shared.\n" + "Use open() to open the buffer before use and to set the mode (read-only, " + "write-only, etc.). close() closes the buffer. The buffer must be closed " + "before reopening or calling setBuffer().\n" + "A common way to use QBuffer is through QDataStream or QTextStream, which " + "have constructors that take a QBuffer parameter. For convenience, there " + "are also QDataStream and QTextStream constructors that take a QByteArray " + "parameter. These constructors create and open an internal QBuffer.\n" + "Note that QTextStream can also operate on a QString (a Unicode string); a " + "QBuffer cannot.\n" + "You can also use QBuffer directly through the standard QIODevice functions " + "readBlock(), writeBlock() readLine(), at(), getch(), putch() and ungetch().\n" + "See also QFile, QDataStream, QTextStream, QByteArray, Shared Classes, Collection " + "Classes and Input/Output and Networking."); } void tst_QBuffer::writeBlock() |