summaryrefslogtreecommitdiffstats
path: root/tests/auto/selftests/tst_selftests.cpp
diff options
context:
space:
mode:
authorjasplin <jo.asplin@nokia.com>2011-06-08 15:13:13 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-07-26 04:18:56 (GMT)
commit01575deafb7d26ca2431374e92c6d71de96547c7 (patch)
treeaa8499a652c4abfb5a1ec98e48612b133f0c2fdf /tests/auto/selftests/tst_selftests.cpp
parent13ea186f3592815899f0cecc07a6094e2360a71e (diff)
downloadQt-01575deafb7d26ca2431374e92c6d71de96547c7.zip
Qt-01575deafb7d26ca2431374e92c6d71de96547c7.tar.gz
Qt-01575deafb7d26ca2431374e92c6d71de96547c7.tar.bz2
Added -datatags option to QTestLib
Passing the -datatags option to a QTestLib program prints the available data tags to standard output. Data tags for each test function (f() in this case) are printed in four different ways depending on the presence of local and global data tags: Case 1: No tags: f() Case 2: Local tags only: f() local tag 1 f() local tag 2 ... Case 3: Global tags only: f() __global__ global tag 1 f() __global__ global tag 2 ... Case 4: Local and global tags: f() local tag 1 __global__ global tag 1 f() local tag 2 __global__ global tag 1 ... f() local tag 1 __global__ global tag 2 f() local tag 2 __global__ global tag 2 ... ... Reviewed-by: Rohan McGovern Task-number: QTQAINFRA-226 Change-Id: I14de203b586a0085b8efda8e62772711e44677d2
Diffstat (limited to 'tests/auto/selftests/tst_selftests.cpp')
-rw-r--r--tests/auto/selftests/tst_selftests.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index 1a95420..3686304 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -245,6 +245,8 @@ void tst_Selftests::runSubTest_data()
<< "xunit"
<< "longstring"
<< "badxml"
+ << "printdatatags"
+ << "printdatatagswithglobaltags"
;
foreach (Logger const& logger, allLoggers()) {
@@ -273,6 +275,12 @@ void tst_Selftests::runSubTest_data()
else if (subtest == "badxml") {
arguments << "-eventcounter";
}
+ else if (subtest == "printdatatags") {
+ arguments << "-datatags";
+ }
+ else if (subtest == "printdatatagswithglobaltags") {
+ arguments << "-datatags";
+ }
// These tests don't work right with loggers other than plain, usually because
// they internally supply arguments to themselves.
@@ -289,6 +297,12 @@ void tst_Selftests::runSubTest_data()
if (subtest == "waitwithoutgui") {
continue;
}
+ if (subtest == "printdatatags") {
+ continue;
+ }
+ if (subtest == "printdatatagswithglobaltags") {
+ continue;
+ }
// `crashes' will not output valid XML on platforms without a crash handler
if (subtest == "crashes") {
continue;