Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print actual values instead of pointers when FieldMatcher is used #89

Closed
GoogleCodeExporter opened this issue Apr 9, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
struct A {
  A(int a) : a_(a){}
  int a_;
};

struct Mock {
  MOCK_METHOD1(Foo, void(A*));
};

A tmp(10);
EXPECT_CALL(mock, Foo(Field(&A::a_, 5)));
mock.Foo(&tmp);

What is the expected output? 

 Expected arg #0: the given field is equal to 5
          Actual: 10

What do you see instead?

 Expected arg #0: the given field is equal to 5
          Actual: 0037FB48



Original issue reported on code.google.com by sto...@google.com on 20 Nov 2009 at 11:38

@GoogleCodeExporter
Copy link
Author

We can make the implementation of Field() print the value of the field in
ExplainMatchResultTo().  We should do the same for matchers Property() and 
ResultOf().

Original comment by w...@google.com on 3 Dec 2009 at 4:51

  • Changed state: Accepted
  • Added labels: OpSys-All, Type-Enhancement, Usability
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Fixed by Manuel Klimek.

Original comment by w...@google.com on 23 Mar 2010 at 7:29

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant