summaryrefslogtreecommitdiff
path: root/tests/auto/language/testdata/throw.qbs
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-05-16 17:14:03 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2023-05-17 08:49:05 +0000
commit610508fcbf95b16567a17f53fd370f9b0ae3505b (patch)
tree5812c8e4c691e808cb340cc55a92038abda35142 /tests/auto/language/testdata/throw.qbs
parent36887c42052e92eb8d0576e6d25699e0a49bc1f9 (diff)
downloadqbs-610508fcbf95b16567a17f53fd370f9b0ae3505b.tar.gz
Properly handle non-string exceptions2.0
Fixes: QBS-1734 Change-Id: If7901dc698fdd5ee44021a3b92cf28295123eccc Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'tests/auto/language/testdata/throw.qbs')
-rw-r--r--tests/auto/language/testdata/throw.qbs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/language/testdata/throw.qbs b/tests/auto/language/testdata/throw.qbs
new file mode 100644
index 000000000..e9a97efb5
--- /dev/null
+++ b/tests/auto/language/testdata/throw.qbs
@@ -0,0 +1,16 @@
+Project {
+ property string throwType
+ property bool dummy: {
+ if (throwType === "bool")
+ throw true;
+ if (throwType === "int")
+ throw 43;
+ if (throwType === "string")
+ throw "an error";
+ if (throwType === "list")
+ throw ["an", "error"];
+ if (throwType === "object")
+ throw { result: "crash", reason: "overheating" };
+ throw "type missing";
+ }
+}