aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-05-12 15:00:13 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-05-12 16:45:06 +0200
commit44fb1b39f48ba0c700e4ec90e84421eaf886c702 (patch)
tree85a071939cff7754911a4f000c7d857d1b40db7e /tests/auto/blackbox/testdata
parentf6672a3fd11ed74a991ce1a96fdc72d451c39287 (diff)
add simple blackbox test for Probe items
Change-Id: Ie0df664a2bec152ea7d537365df108a9da03d2ef Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'tests/auto/blackbox/testdata')
-rw-r--r--tests/auto/blackbox/testdata/simpleProbe/main.cpp1
-rw-r--r--tests/auto/blackbox/testdata/simpleProbe/simpleProbe.qbs30
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/simpleProbe/main.cpp b/tests/auto/blackbox/testdata/simpleProbe/main.cpp
new file mode 100644
index 000000000..76e819701
--- /dev/null
+++ b/tests/auto/blackbox/testdata/simpleProbe/main.cpp
@@ -0,0 +1 @@
+int main() { return 0; }
diff --git a/tests/auto/blackbox/testdata/simpleProbe/simpleProbe.qbs b/tests/auto/blackbox/testdata/simpleProbe/simpleProbe.qbs
new file mode 100644
index 000000000..8686b6f9d
--- /dev/null
+++ b/tests/auto/blackbox/testdata/simpleProbe/simpleProbe.qbs
@@ -0,0 +1,30 @@
+import qbs 1.0
+import qbs.Probes
+
+CppApplication {
+ Probe {
+ id: probe1
+ property string someString
+ configure: {
+ someString = "one";
+ found = true;
+ }
+ }
+ Probe {
+ id: probe2
+ configure: {
+ found = false;
+ }
+ }
+ name: {
+ if (!probe1.found)
+ throw "probe1 not found";
+ if (probe2.found)
+ throw "probe2 unexpectedly found";
+ if (probe1.someString !== "one")
+ throw "probe1.someString expected to be \"one\"."
+ return "MyApp";
+ }
+ files: ["main.cpp"]
+}
+