aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorfchin <Frankie.Chin@biamp.com>2019-11-12 12:11:12 +1000
committerMichael Hirsch, Ph.D <10931741+scivision@users.noreply.github.com>2019-11-12 09:21:10 -0500
commit4e460f04f3b2d767027c7769bab6eb8029b22422 (patch)
tree866c4d7e02601ea2e3fceb15cd4d2a34c75ad383 /test cases
parentadb4e071e688534fd7c163719f005239cd2f7c25 (diff)
downloadmeson-4e460f04f3b2d767027c7769bab6eb8029b22422.zip
meson-4e460f04f3b2d767027c7769bab6eb8029b22422.tar.gz
meson-4e460f04f3b2d767027c7769bab6eb8029b22422.tar.bz2
Fixed issue that the key's value type wasn't checked correctly.
Added two new failing tests.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/failing/97 add dict non string key/meson.build9
-rw-r--r--test cases/failing/98 add dict duplicate keys/meson.build9
2 files changed, 18 insertions, 0 deletions
diff --git a/test cases/failing/97 add dict non string key/meson.build b/test cases/failing/97 add dict non string key/meson.build
new file mode 100644
index 0000000..c81a3f7
--- /dev/null
+++ b/test cases/failing/97 add dict non string key/meson.build
@@ -0,0 +1,9 @@
+project('add dictionary entry using non-string key')
+
+dict = {}
+
+# An integer variable to be used as a key
+key = 1
+
+# Add new entry using integer variable as key should fail
+dict += {key : 'myValue'} \ No newline at end of file
diff --git a/test cases/failing/98 add dict duplicate keys/meson.build b/test cases/failing/98 add dict duplicate keys/meson.build
new file mode 100644
index 0000000..7a9b523
--- /dev/null
+++ b/test cases/failing/98 add dict duplicate keys/meson.build
@@ -0,0 +1,9 @@
+project('add dictionary entries with duplicate keys')
+
+dict = {}
+
+# A variable to be used as a key
+key = 'myKey'
+
+# Add two entries with duplicate keys should fail
+dict += {key : 'myValue1', key : 'myValue2'} \ No newline at end of file