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()

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

◆ _GenericDiagnoser()

gmock_doctor._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()

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

◆ _MockObjectPointerDiagnoser()

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

◆ _NeedToReturnNothingDiagnoser()

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

◆ _NeedToReturnReferenceDiagnoser()

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

◆ _NeedToReturnSomethingDiagnoser()

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

◆ _NeedToUseReturnNullDiagnoser()

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

◆ _NeedToUseSymbolDiagnoser()

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

◆ _OverloadedFunctionActionDiagnoser()

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

◆ _OverloadedFunctionMatcherDiagnoser()

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

◆ _OverloadedMethodActionDiagnoser()

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

◆ _TypeInTemplatedBaseDiagnoser()

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

◆ _WrongMockMethodMacroDiagnoser()

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

◆ _WrongParenPositionDiagnoser()

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

◆ Diagnose()

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

◆ main()

gmock_doctor.main ( void )

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:
1= (
2 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:
1= [
2 _IncompleteByReferenceArgumentDiagnoser,
3 _MockObjectPointerDiagnoser,
4 _NeedToReturnNothingDiagnoser,
5 _NeedToReturnReferenceDiagnoser,
6 _NeedToReturnSomethingDiagnoser,
7 _NeedToUseReturnNullDiagnoser,
8 _NeedToUseSymbolDiagnoser,
9 _OverloadedFunctionActionDiagnoser,
10 _OverloadedFunctionMatcherDiagnoser,
11 _OverloadedMethodActionDiagnoser,
12 _TypeInTemplatedBaseDiagnoser,
13 _WrongMockMethodMacroDiagnoser,
14 _WrongParenPositionDiagnoser,
15 ]

◆ _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