The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
325 B
12 lines
325 B
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')
|
|
|