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.
23 lines
448 B
23 lines
448 B
project('dict test', 'c') |
|
|
|
dict = {'foo' : 'bar', |
|
'baz' : 'foo', |
|
'foo bar': 'baz'} |
|
|
|
exe = executable('prog', sources : ['prog.c']) |
|
|
|
i = 0 |
|
|
|
foreach key, value : dict |
|
test('dict test @0@'.format(key), exe, |
|
args : [dict[key], value]) |
|
i += 1 |
|
endforeach |
|
|
|
assert(i == 3, 'There should be three elements in that dictionary') |
|
|
|
empty_dict = {} |
|
|
|
foreach key, value : empty_dict |
|
assert(false, 'This dict should be empty') |
|
endforeach
|
|
|