gpu/command_buffer/build_cmd_buffer_lib.py
def WriteValidUnitTest(self, func, f, test, *extras):
    """Writes a valid unit test for the service implementation."""
    if not func.GetInfo('expectation', True):
      test = self._remove_expected_call_re.sub('', test)
    name = func.name
    arg_strings = [
      arg.GetValidArg(func) \
      for arg in func.GetOriginalArgs() if not arg.IsConstant()
    ]
    gl_arg_strings = [
      arg.GetValidGLArg(func) \
      for arg in func.GetOriginalArgs()
    ]
    gl_func_name = func.GetGLTestFunctionName()
    varz = {
      'name': name,
      'gl_func_name': gl_func_name,
      'args': ", ".join(arg_strings),
      'gl_args': ", ".join(gl_arg_strings),
    }
    for extra in extras:
      varz.update(extra)
    old_test = ""
    while (old_test != test):
      old_test = test
      test = test % varz
    f.write(test % varz)
Writes a valid unit test for the service implementation.
Writes a valid unit test for the service implementation.
Writes a valid unit test for the service implementation .
def WriteValidUnitTest(self, func, f, test, *extras):
    if not func.GetInfo('expectation', True):
      test = self._remove_expected_call_re.sub('', test)
    name = func.name
    arg_strings = [
      arg.GetValidArg(func) \
      for arg in func.GetOriginalArgs() if not arg.IsConstant()
    ]
    gl_arg_strings = [
      arg.GetValidGLArg(func) \
      for arg in func.GetOriginalArgs()
    ]
    gl_func_name = func.GetGLTestFunctionName()
    varz = {
      'name': name,
      'gl_func_name': gl_func_name,
      'args': ", ".join(arg_strings),
      'gl_args': ", ".join(gl_arg_strings),
    }
    for extra in extras:
      varz.update(extra)
    old_test = ""
    while (old_test != test):
      old_test = test
      test = test % varz
    f.write(test % varz)
def WriteValidUnitTest ( self , func , f , test , * extras ) : if not func . GetInfo ( 'expectation' , True ) : test = self . _remove_expected_call_re . sub ( '' , test ) name = func . name arg_strings = [ arg . GetValidArg ( func ) for arg in func . GetOriginalArgs ( ) if not arg . IsConstant ( ) ] gl_arg_strings = [ arg . GetValidGLArg ( func ) for arg in func . GetOriginalArgs ( ) ] gl_func_name = func . GetGLTestFunctionName ( ) varz = { 'name' : name , 'gl_func_name' : gl_func_name , 'args' : ", " . join ( arg_strings ) , 'gl_args' : ", " . join ( gl_arg_strings ) , } for extra in extras : varz . update ( extra ) old_test = "" while ( old_test != test ) : old_test = test test = test % varz f . write ( test % varz )
Writes a valid unit test for the service implementation.
Writes a valid unit test for the service implementation .
"""Writes a valid unit test for the service implementation."""
self
func
f
test