Monero
Loading...
Searching...
No Matches
gmock_doctor Namespace Reference

Functions

 _FindAllMatches (regex, s)
 _GenericDiagnoser (short_name, long_name, diagnoses, msg)
 _NeedToReturnReferenceDiagnoser (msg)
 _NeedToReturnSomethingDiagnoser (msg)
 _NeedToReturnNothingDiagnoser (msg)
 _IncompleteByReferenceArgumentDiagnoser (msg)
 _OverloadedFunctionMatcherDiagnoser (msg)
 _OverloadedFunctionActionDiagnoser (msg)
 _OverloadedMethodActionDiagnoser (msg)
 _MockObjectPointerDiagnoser (msg)
 _NeedToUseSymbolDiagnoser (msg)
 _NeedToUseReturnNullDiagnoser (msg)
 _TypeInTemplatedBaseDiagnoser (msg)
 _WrongMockMethodMacroDiagnoser (msg)
 _WrongParenPositionDiagnoser (msg)
 Diagnose (msg)
 main ()

Variables

str __author__ = 'wan@google.com (Zhanyong Wan)'
str _VERSION = '1.0.3'
str _EMAIL = 'googlemock@googlegroups.com'
list _COMMON_GMOCK_SYMBOLS
str _GCC_FILE_LINE_RE = r'(?P<file>.*):(?P<line>\d+):(\d+:)?\s+'
str _CLANG_FILE_LINE_RE = r'(?P<file>.*):(?P<line>\d+):(?P<column>\d+):\s+'
tuple _CLANG_NON_GMOCK_FILE_LINE_RE
list _DIAGNOSERS

Detailed Description

Converts compiler's errors in code using Google Mock to plain English.

Function Documentation

◆ _FindAllMatches()

_FindAllMatches ( regex,
s )
protected
Generates all matches of regex in string s.

◆ _GenericDiagnoser()

_GenericDiagnoser ( short_name,
long_name,
diagnoses,
msg )
protected
Diagnoses the given disease by pattern matching.

Can provide different diagnoses for different patterns.

Args:
  short_name: Short name of the disease.
  long_name:  Long name of the disease.
  diagnoses:  A list of pairs (regex, pattern for formatting the diagnosis
              for matching regex).
  msg:        Compiler's error messages.
Yields:
  Tuples of the form
    (short name of disease, long name of disease, diagnosis).

◆ _IncompleteByReferenceArgumentDiagnoser()

_IncompleteByReferenceArgumentDiagnoser ( msg)
protected
Diagnoses the IBRA disease, given the error messages by the compiler.

◆ _MockObjectPointerDiagnoser()

_MockObjectPointerDiagnoser ( msg)
protected
Diagnoses the MOP disease, given the error messages by the compiler.

◆ _NeedToReturnNothingDiagnoser()

_NeedToReturnNothingDiagnoser ( msg)
protected
Diagnoses the NRN disease, given the error messages by the compiler.

◆ _NeedToReturnReferenceDiagnoser()

_NeedToReturnReferenceDiagnoser ( msg)
protected
Diagnoses the NRR disease, given the error messages by the compiler.

◆ _NeedToReturnSomethingDiagnoser()

_NeedToReturnSomethingDiagnoser ( msg)
protected
Diagnoses the NRS disease, given the error messages by the compiler.

◆ _NeedToUseReturnNullDiagnoser()

_NeedToUseReturnNullDiagnoser ( msg)
protected
Diagnoses the NRNULL disease, given the error messages by the compiler.

◆ _NeedToUseSymbolDiagnoser()

_NeedToUseSymbolDiagnoser ( msg)
protected
Diagnoses the NUS disease, given the error messages by the compiler.

◆ _OverloadedFunctionActionDiagnoser()

_OverloadedFunctionActionDiagnoser ( msg)
protected
Diagnoses the OFA disease, given the error messages by the compiler.

◆ _OverloadedFunctionMatcherDiagnoser()

_OverloadedFunctionMatcherDiagnoser ( msg)
protected
Diagnoses the OFM disease, given the error messages by the compiler.

◆ _OverloadedMethodActionDiagnoser()

_OverloadedMethodActionDiagnoser ( msg)
protected
Diagnoses the OMA disease, given the error messages by the compiler.

◆ _TypeInTemplatedBaseDiagnoser()

_TypeInTemplatedBaseDiagnoser ( msg)
protected
Diagnoses the TTB disease, given the error messages by the compiler.

◆ _WrongMockMethodMacroDiagnoser()

_WrongMockMethodMacroDiagnoser ( msg)
protected
Diagnoses the WMM disease, given the error messages by the compiler.

◆ _WrongParenPositionDiagnoser()

_WrongParenPositionDiagnoser ( msg)
protected
Diagnoses the WPP disease, given the error messages by the compiler.

◆ Diagnose()

Diagnose ( msg)
Generates all possible diagnoses given the compiler error message.

◆ main()

main ( )

Variable Documentation

◆ __author__

str gmock_doctor.__author__ = 'wan@google.com (Zhanyong Wan)'
private

◆ _CLANG_FILE_LINE_RE

str gmock_doctor._CLANG_FILE_LINE_RE = r'(?P<file>.*):(?P<line>\d+):(?P<column>\d+):\s+'
protected

◆ _CLANG_NON_GMOCK_FILE_LINE_RE

tuple gmock_doctor._CLANG_NON_GMOCK_FILE_LINE_RE
protected
Initial value:
= (
r'(?P<file>.*[/\\^](?!gmock-)[^/\\]+):(?P<line>\d+):(?P<column>\d+):\s+')

◆ _COMMON_GMOCK_SYMBOLS

list gmock_doctor._COMMON_GMOCK_SYMBOLS
protected

◆ _DIAGNOSERS

list gmock_doctor._DIAGNOSERS
protected
Initial value:
= [
_IncompleteByReferenceArgumentDiagnoser,
_MockObjectPointerDiagnoser,
_NeedToReturnNothingDiagnoser,
_NeedToReturnReferenceDiagnoser,
_NeedToReturnSomethingDiagnoser,
_NeedToUseReturnNullDiagnoser,
_NeedToUseSymbolDiagnoser,
_OverloadedFunctionActionDiagnoser,
_OverloadedFunctionMatcherDiagnoser,
_OverloadedMethodActionDiagnoser,
_TypeInTemplatedBaseDiagnoser,
_WrongMockMethodMacroDiagnoser,
_WrongParenPositionDiagnoser,
]

◆ _EMAIL

str gmock_doctor._EMAIL = 'googlemock@googlegroups.com'
protected

◆ _GCC_FILE_LINE_RE

str gmock_doctor._GCC_FILE_LINE_RE = r'(?P<file>.*):(?P<line>\d+):(\d+:)?\s+'
protected

◆ _VERSION

str gmock_doctor._VERSION = '1.0.3'
protected