diff options
Diffstat (limited to 'src')
5 files changed, 20 insertions, 16 deletions
diff --git a/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc b/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc index 93bf5111a0..10d9cb5bee 100644 --- a/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc +++ b/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc @@ -54,9 +54,9 @@ Totals: 3 passed, 0 failed, 0 skipped ********* Start testing of TestQString ********* Config: Using QtTest library %VERSION%, Qt %VERSION% PASS : TestQString::initTestCase() -PASS : TestQString::toUpper(all lower) +PASS : TestQString::toUpper(all-lower) PASS : TestQString::toUpper(mixed) -PASS : TestQString::toUpper(all upper) +PASS : TestQString::toUpper(all-upper) PASS : TestQString::cleanupTestCase() Totals: 5 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of TestQString ********* @@ -77,7 +77,7 @@ Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 20ms Config: Using QtTest library %VERSION%, Qt %VERSION% PASS : TestGui::initTestCase() PASS : TestGui::testGui(char) -PASS : TestGui::testGui(there and back again) +PASS : TestGui::testGui(there+back-again) PASS : TestGui::cleanupTestCase() Totals: 4 passed, 0 failed, 0 skipped, 0 blacklisted, 18ms ********* Finished testing of TestGui ********* @@ -90,12 +90,12 @@ PASS : TestBenchmark::initTestCase() PASS : TestBenchmark::simple() RESULT : TestBenchmark::simple(): 0.00030 msecs per iteration (total: 79, iterations: 262144) -PASS : TestBenchmark::multiple(locale aware compare) -RESULT : TestBenchmark::multiple():"locale aware compare": +PASS : TestBenchmark::multiple(locale-aware-compare) +RESULT : TestBenchmark::multiple():"locale-aware-compare": 0.00029 msecs per iteration (total: 78, iterations: 262144) ..... -PASS : TestBenchmark::series(locale aware compare--8001) -RESULT : TestBenchmark::series():"locale aware compare--8001": +PASS : TestBenchmark::series(locale-aware-compare:8001) +RESULT : TestBenchmark::series():"locale-aware-compare:8001": 0.039 msecs per iteration (total: 81, iterations: 2048) Totals: 15 passed, 0 failed, 0 skipped, 0 blacklisted, 3971ms ********* Finished testing of TestBenchmark ********* diff --git a/src/testlib/doc/snippets/code/doc_src_qtqskip.cpp b/src/testlib/doc/snippets/code/doc_src_qtqskip.cpp index 14f5085dd4..85aed2870d 100644 --- a/src/testlib/doc/snippets/code/doc_src_qtqskip.cpp +++ b/src/testlib/doc/snippets/code/doc_src_qtqskip.cpp @@ -13,8 +13,8 @@ void tst_Skip::test_data() { //! [1] QTest::addColumn<bool>("bool"); - QTest::newRow("local 1") << false; - QTest::newRow("local 2") << true; + QTest::newRow("local.1") << false; + QTest::newRow("local.2") << true; QSKIP("skipping all"); //! [1] diff --git a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp index 63d0b992fc..532b26b4f1 100644 --- a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp +++ b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp @@ -56,8 +56,8 @@ void TestQString::toInt_data() QTest::addColumn<QString>("aString"); QTest::addColumn<int>("expected"); - QTest::newRow("positive value") << "42" << 42; - QTest::newRow("negative value") << "-42" << -42; + QTest::newRow("positive+value") << "42" << 42; + QTest::newRow("negative-value") << "-42" << -42; QTest::newRow("zero") << "0" << 0; } //! [3] @@ -135,8 +135,8 @@ dir.mkdir(""); void MyTestClass::addSingleStringRows() { QTest::addColumn<QString>("aString"); - QTest::newRow("just hello") << QString("hello"); - QTest::newRow("a null string") << QString(); + QTest::newRow("just.hello") << QString("hello"); + QTest::newRow("a.null.string") << QString(); } //! [20] diff --git a/src/testlib/doc/src/qttest-best-practices.qdoc b/src/testlib/doc/src/qttest-best-practices.qdoc index 3980b453f7..6633b07630 100644 --- a/src/testlib/doc/src/qttest-best-practices.qdoc +++ b/src/testlib/doc/src/qttest-best-practices.qdoc @@ -108,7 +108,11 @@ Do not simply number the test-case, or use bug-tracking identifiers. Someone reading the test output will have no idea what the numbers or identifiers mean. You can add a comment on the test-row that mentions the bug-tracking - identifier, when relevant. + identifier, when relevant. It's best to avoid spacing characters and + characters that may be significant to command-line shells on which you may + want to run tests. This makes it easier to specify the test and tag on \l{Qt + Test Command Line Arguments}{the command-line} to your test program - for + example, to limit a test run to just one test-case. \section2 Write Self-contained Test Functions diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc index 3d9cfb3e3c..53ef055d2b 100644 --- a/src/testlib/doc/src/qttestlib-manual.qdoc +++ b/src/testlib/doc/src/qttestlib-manual.qdoc @@ -671,7 +671,7 @@ \li result \row \li 0 - \li all lower + \li all-lower \li "hello" \li HELLO \row @@ -681,7 +681,7 @@ \li HELLO \row \li 2 - \li all upper + \li all-upper \li "HELLO" \li HELLO \endtable |