aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/api/testdata/add-qobject-macro-to-cpp-file
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-08-11 15:59:09 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-08-14 11:16:34 +0200
commit09d9ce2c265450d786052100bedb059870dddc23 (patch)
tree3e811fa1a328a8d19ddbffec5a94d2c61add84fc /tests/auto/api/testdata/add-qobject-macro-to-cpp-file
parent4e7f1023b0fc1349047357cf8926fa68761cc546 (diff)
Turn some blackbox tests into API tests.
Different test executables can run in parallel, whereas the functions within one test executable cannot. This means that tst_blackbox is currently a bottleneck, as it takes an order of magnitude longer than all other tests combined. We therefore turn a number of blackbox tests into API tests (most tests work equally well in either). The run-time of these two test executables is now about the same, and as a result, the time it takes to run "make check" has almost halved. Change-Id: I55ef43a60588f86a8438bdecb7795aca0880efd0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/api/testdata/add-qobject-macro-to-cpp-file')
-rw-r--r--tests/auto/api/testdata/add-qobject-macro-to-cpp-file/main.cpp7
-rw-r--r--tests/auto/api/testdata/add-qobject-macro-to-cpp-file/object.cpp13
-rw-r--r--tests/auto/api/testdata/add-qobject-macro-to-cpp-file/object.h4
-rw-r--r--tests/auto/api/testdata/add-qobject-macro-to-cpp-file/project.qbs6
4 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/main.cpp b/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/main.cpp
new file mode 100644
index 000000000..940a7628d
--- /dev/null
+++ b/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/main.cpp
@@ -0,0 +1,7 @@
+#include "object.h"
+
+int main()
+{
+ Object o;
+ o.f();
+}
diff --git a/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/object.cpp b/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/object.cpp
new file mode 100644
index 000000000..aab24f6c0
--- /dev/null
+++ b/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/object.cpp
@@ -0,0 +1,13 @@
+#include "object.h"
+
+#include <QObject>
+
+// class InternalClass : public QObject
+// {
+// Q_OBJECT
+// };
+
+void Object::f() { }
+
+
+// #include "object.moc"
diff --git a/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/object.h b/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/object.h
new file mode 100644
index 000000000..37070b494
--- /dev/null
+++ b/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/object.h
@@ -0,0 +1,4 @@
+class Object {
+public:
+ void f();
+};
diff --git a/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/project.qbs b/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/project.qbs
new file mode 100644
index 000000000..40c5395ef
--- /dev/null
+++ b/tests/auto/api/testdata/add-qobject-macro-to-cpp-file/project.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+QtApplication {
+ files: ["main.cpp", "object.h", "object.cpp"]
+}
+