Simpler name.

pull/15/head
Jussi Pakkanen 11 years ago
parent 9e122005cf
commit df9d1bcbfc
  1. 2
      interpreter.py
  2. 4
      test cases/common/33 try compile/meson.build

@ -734,7 +734,7 @@ class CompilerHolder(InterpreterObject):
if len(args) != 1:
raise InterpreterException('compiles method takes exactly one argument.')
string = args[0]
testname = kwargs.get('testname', '')
testname = kwargs.get('name', '')
if not isinstance(testname, str):
raise InterpreterException('Testname argument must be a string.')
if isinstance(string, nodes.StringStatement):

@ -9,10 +9,10 @@ void func() { printf("This won't work.\n"); }
'''
compiler = meson.get_compiler('c')
if compiler.compiles(code, testname : 'should succeed') == false
if compiler.compiles(code, name : 'should succeed') == false
error('Compiler is fail.')
endif
if compiler.compiles(breakcode, testname : 'should fail')
if compiler.compiles(breakcode, name : 'should fail')
error('Compiler returned true on broken code.')
endif

Loading…
Cancel
Save