parameters: (self, func, file, test, extra = {})
docstring: Writes a valid unit test.
docstring_summary: Writes a valid unit test.
docstring_tokens: Writes a valid unit test .
function: def WriteValidUnitTest(self, func, file, test, extra = {}):
      """Writes a valid unit test."""
      if func.GetInfo('expectation') == False:
        test = self._remove_expected_call_re.sub('', test)
      name = func.name
      arg_strings = []
      count = 0
      for arg in func.GetOriginalArgs():
        arg_strings.append(arg.GetValidArg(func, count, 0))
        count += 1
      gl_arg_strings = []
      count = 0
      for arg in func.GetOriginalArgs():
        gl_arg_strings.append(arg.GetValidGLArg(func, count, 0))
        count += 1
      gl_func_name = func.GetGLTestFunctionName()
      vars = {
        'test_name': 'GLES2DecoderTest%d' % file.file_num,
        'name':name,
        'gl_func_name': gl_func_name,
        'args': ", ".join(arg_strings),
        'gl_args': ", ".join(gl_arg_strings),
      }
      vars.update(extra)
      file.Write(test % vars)
function_tokens: def WriteValidUnitTest ( self , func , file , test , extra = { } ) : if func . GetInfo ( 'expectation' ) == False : test = self . _remove_expected_call_re . sub ( '' , test ) name = func . name arg_strings = [ ] count = 0 for arg in func . GetOriginalArgs ( ) : arg_strings . append ( arg . GetValidArg ( func , count , 0 ) ) count += 1 gl_arg_strings = [ ] count = 0 for arg in func . GetOriginalArgs ( ) : gl_arg_strings . append ( arg . GetValidGLArg ( func , count , 0 ) ) count += 1 gl_func_name = func . GetGLTestFunctionName ( ) vars = { 'test_name' : 'GLES2DecoderTest%d' % file . file_num , 'name' : name , 'gl_func_name' : gl_func_name , 'args' : ", " . join ( arg_strings ) , 'gl_args' : ", " . join ( gl_arg_strings ) , } vars . update ( extra ) file . Write ( test % vars )