Factors out email address in Google Mock Doctor messages.
This commit is contained in:
		@@ -38,6 +38,8 @@ import sys
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
_VERSION = '1.0.3'
 | 
					_VERSION = '1.0.3'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					_EMAIL = 'googlemock@googlegroups.com'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
_COMMON_GMOCK_SYMBOLS = [
 | 
					_COMMON_GMOCK_SYMBOLS = [
 | 
				
			||||||
    # Matchers
 | 
					    # Matchers
 | 
				
			||||||
    '_',
 | 
					    '_',
 | 
				
			||||||
@@ -563,16 +565,17 @@ def main():
 | 
				
			|||||||
  diagnoses = Diagnose(msg)
 | 
					  diagnoses = Diagnose(msg)
 | 
				
			||||||
  count = len(diagnoses)
 | 
					  count = len(diagnoses)
 | 
				
			||||||
  if not count:
 | 
					  if not count:
 | 
				
			||||||
    print '\nGcc complained:'
 | 
					    print ("""
 | 
				
			||||||
    print '8<------------------------------------------------------------'
 | 
					Your compiler complained:
 | 
				
			||||||
    print msg
 | 
					8<------------------------------------------------------------
 | 
				
			||||||
    print '------------------------------------------------------------>8'
 | 
					%s
 | 
				
			||||||
    print """
 | 
					------------------------------------------------------------>8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Uh-oh, I'm not smart enough to figure out what the problem is. :-(
 | 
					Uh-oh, I'm not smart enough to figure out what the problem is. :-(
 | 
				
			||||||
However...
 | 
					However...
 | 
				
			||||||
If you send your source code and the compiler's error messages to
 | 
					If you send your source code and the compiler's error messages to
 | 
				
			||||||
googlemock@googlegroups.com, you can be helped and I can get smarter --
 | 
					%s, you can be helped and I can get smarter --
 | 
				
			||||||
win-win for us!"""
 | 
					win-win for us!""" % (msg, _EMAIL))
 | 
				
			||||||
  else:
 | 
					  else:
 | 
				
			||||||
    print '------------------------------------------------------------'
 | 
					    print '------------------------------------------------------------'
 | 
				
			||||||
    print 'Your code appears to have the following',
 | 
					    print 'Your code appears to have the following',
 | 
				
			||||||
@@ -586,10 +589,11 @@ win-win for us!"""
 | 
				
			|||||||
      if count > 1:
 | 
					      if count > 1:
 | 
				
			||||||
        print '\n#%s:' % (i,)
 | 
					        print '\n#%s:' % (i,)
 | 
				
			||||||
      print d
 | 
					      print d
 | 
				
			||||||
    print """
 | 
					    print ("""
 | 
				
			||||||
How did I do?  If you think I'm wrong or unhelpful, please send your
 | 
					How did I do?  If you think I'm wrong or unhelpful, please send your
 | 
				
			||||||
source code and compiler's error messages to googlemock@googlegroups.com.
 | 
					source code and the compiler's error messages to %s.
 | 
				
			||||||
Then you can be helped and I can get smarter -- I promise I won't be upset!"""
 | 
					Then you can be helped and I can get smarter -- I promise I won't be upset!""" %
 | 
				
			||||||
 | 
					           _EMAIL)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user