keeganwitt / gmock

Automatically exported from code.google.com/p/gmock
6 stars 2 forks source link

Improve error messages of unexpected method call #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
No changes if there is only one mock:

Unexpected method call 'load(3)'
  'load(2)': expected 1, actual 1
  'load(1)': expected 1, actual 1
  ...

Otherwise:

Unexpected method call 'load(3)' on 'Mock for Loader (1)'
  'load(2)' on 'Mock for Loader (1)': expected 1, actual 1
  'load(1)' on 'Mock for Loader (2)': expected 1, actual 1
  ...

And for strict ordering:

Unexpected method call 'load(3)'
  strict:
    'load(2)': expected 1, actual 1
    'load(1)': expected 1, actual 1
    ...

And:

Unexpected method call 'load(3)' on(or "of"? I am not sure) 'Mock for
Loader (1)'
  strict:
    'load(2)' on 'Mock for Loader (2)': expected 1, actual 1
    loose:
      ...
    ...
  strict:
    ...
  unordered:
    ...

Original issue reported on code.google.com by JohnnyJianHY on 26 Feb 2009 at 12:09

GoogleCodeExporter commented 9 years ago
Aha, forgot to remove '(or "of"? I am not sure)' from the last example :)

Original comment by JohnnyJianHY on 26 Feb 2009 at 12:10

GoogleCodeExporter commented 9 years ago

Original comment by julien.g...@gmail.com on 26 Feb 2009 at 6:21

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 1 Mar 2009 at 7:55

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 1 Mar 2009 at 1:15