aboutsummaryrefslogtreecommitdiff
path: root/test cases/common/57 array methods/meson.build
blob: cdda41dbfc8f43d5f6cc7703e4c23a43847d6ec7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
project('array methods', 'c')

empty = []
one = ['abc']
two = ['def', 'ghi']
combined = [empty, one, two]

if empty.contains('abc')
  error('Empty is not empty.')
endif

if one.contains('a')
  error('One claims to contain a')
endif

if not one.contains('abc')
  error('One claims to not contain abc.')
endif

if one.contains('abcd')
  error('One claims to contain abcd.')
endif

if two.contains('abc')
  error('Two claims to contain abc.')
endif

if not two.contains('def')
  error('Two claims not to contain def.')
endif

if not two.contains('ghi')
  error('Two claims not to contain ghi.')
endif

if two.contains('defg')
  error('Two claims to contain defg.')
endif

if not combined.contains('abc')
  error('Combined claims not to contain abc.')
endif

if not combined.contains('ghi')
  error('Combined claims not to contain ghi.')
endif