interpreter: Rename get_unittest_flag() to unittest_args()

pull/685/head
Matthias Klumpp 9 years ago
parent 12a01c26f3
commit 309f7a1b4a
  1. 4
      mesonbuild/compilers.py
  2. 10
      mesonbuild/interpreter.py

@ -1505,7 +1505,7 @@ class DCompiler(Compiler):
def get_soname_args(self, shlib_name, path, soversion):
return []
def get_unittest_flag(self):
def get_unittest_args(self):
return ['-unittest']
def get_buildtype_linker_args(self, buildtype):
@ -1587,7 +1587,7 @@ class GnuDCompiler(DCompiler):
def build_rpath_args(self, build_dir, rpath_paths, install_rpath):
return build_unix_rpath_args(build_dir, rpath_paths, install_rpath)
def get_unittest_flag(self):
def get_unittest_args(self):
return ['-funittest']
class LLVMDCompiler(DCompiler):

@ -597,7 +597,7 @@ class CompilerHolder(InterpreterObject):
'find_library': self.find_library_method,
'has_argument' : self.has_argument_method,
'first_supported_argument' : self.first_supported_argument_method,
'get_unittest_flag' : self.get_unittest_flag_method,
'unittest_args' : self.unittest_args_method,
})
def version_method(self, args, kwargs):
@ -651,11 +651,11 @@ class CompilerHolder(InterpreterObject):
def get_id_method(self, args, kwargs):
return self.compiler.get_id()
def get_unittest_flag_method(self, args, kwargs):
def unittest_args_method(self, args, kwargs):
# At time, only D compilers have this feature.
if not getattr(self.compiler, "get_unittest_flag", None):
return ''
return self.compiler.get_unittest_flag()
if not hasattr(self.compiler, 'get_unittest_args'):
raise InterpreterException('This {} compiler has no unittest arguments.'.format(self.compiler.language))
return self.compiler.get_unittest_args()
def has_member_method(self, args, kwargs):
if len(args) != 2:

Loading…
Cancel
Save