on-internet
← Community

Gmock matcher to match against type

Stack Overflow ·

In gmock is there anyway to match against a type rather than value? The class is something like: struct Blob { template<class T> bool is(); // if blob holds data of type T template<class T> T get(); // get data as type T } My matcher looks like this: MATCHER_P(BlobIs, T, "") { return arg->is<T>(); } But the build failed with: error: expected primary-expression before ')' token

Comments

Sign in or sign up to comment and upvote.

No comments yet.