diff options
author | franczc <fchin@biamp.com> | 2019-11-11 16:31:22 +1000 |
---|---|---|
committer | Michael Hirsch, Ph.D <10931741+scivision@users.noreply.github.com> | 2019-11-12 09:21:10 -0500 |
commit | adb4e071e688534fd7c163719f005239cd2f7c25 (patch) | |
tree | e0c3a863adc14a28eb815d637ddd302d02ad9a97 /test cases | |
parent | 51d0e02292f571a0408c8a6a932b352fc6fd48e4 (diff) | |
download | meson-adb4e071e688534fd7c163719f005239cd2f7c25.zip meson-adb4e071e688534fd7c163719f005239cd2f7c25.tar.gz meson-adb4e071e688534fd7c163719f005239cd2f7c25.tar.bz2 |
Adding dictionary entry using string variable as key.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/228 add dict variable key/meson.build | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test cases/common/228 add dict variable key/meson.build b/test cases/common/228 add dict variable key/meson.build new file mode 100644 index 0000000..b39c17e --- /dev/null +++ b/test cases/common/228 add dict variable key/meson.build @@ -0,0 +1,12 @@ +project('add dictionary entry using string variable as key', meson_version: '>=0.52') + +dict = {} + +# A variable to be used as a key +key = 'myKey' + +# Add new entry using the variable +dict += {key : 'myValue'} + +# Test that the stored value is correct +assert(dict[key] == 'myValue', 'Incorrect value retrieved from dictionary') |