Clarified error message for test(). (#7040)

Changes the error message for test() so it now reports the expected and actual number of parameters.

Fixes: #7029
pull/7059/head
Benjamin Frye 5 years ago committed by GitHub
parent 707d3a2e20
commit ad426547e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      mesonbuild/interpreter.py

@ -3790,7 +3790,7 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
def add_test(self, node, args, kwargs, is_base_test):
if len(args) != 2:
raise InterpreterException('Incorrect number of arguments')
raise InterpreterException('test expects 2 arguments, {} given'.format(len(args)))
if not isinstance(args[0], str):
raise InterpreterException('First argument of test must be a string.')
exe = args[1]

Loading…
Cancel
Save