meson.build 840 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. project('array methods', 'c')
  2. empty = []
  3. one = ['abc']
  4. two = ['def', 'ghi']
  5. combined = [empty, one, two]
  6. if empty.contains('abc')
  7. error('Empty is not empty.')
  8. endif
  9. if one.contains('a')
  10. error('One claims to contain a')
  11. endif
  12. if not one.contains('abc')
  13. error('One claims to not contain abc.')
  14. endif
  15. if one.contains('abcd')
  16. error('One claims to contain abcd.')
  17. endif
  18. if two.contains('abc')
  19. error('Two claims to contain abc.')
  20. endif
  21. if not two.contains('def')
  22. error('Two claims not to contain def.')
  23. endif
  24. if not two.contains('ghi')
  25. error('Two claims not to contain ghi.')
  26. endif
  27. if two.contains('defg')
  28. error('Two claims to contain defg.')
  29. endif
  30. if not combined.contains('abc')
  31. error('Combined claims not to contain abc.')
  32. endif
  33. if not combined.contains('ghi')
  34. error('Combined claims not to contain ghi.')
  35. endif