meson.build 381 B

12345678910111213141516
  1. project('arithmetic bidmas', 'c')
  2. if 5 * 3 - 6 / 2 + 1 != 13
  3. error('Arithmetic bidmas broken')
  4. endif
  5. if 5 * (3 - 6 / 2) + 1 != 1
  6. error('Arithmetic bidmas with brackets broken')
  7. endif
  8. if 5 * 12 / 2 * 3 != 90
  9. error('Sequential multiplication and division broken')
  10. endif
  11. if 5 * (12 / (2 * 3)) != 10
  12. error('Sequential multiplication and division with brackets broken')
  13. endif