google / google/googletest

Splitting MOCK_METHOD declaration and definition

Open
#3,434 1 comment 2 reactions 1 assignee Claimed by @sbenzaquen View on GitHub
Dominant language
C++
Stars
39.6k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

I'm working with classes that mocks a lot of methods and each MOCK_METHODxx results in method beining defined in each translation unit. Cookbook mentions defining constructor and destructor for mocks in separate .cpp file so it can be reused, it seems that it makes sense to split declaration and definition of each MOCK_METHOD in order to save some compilation time.

There is closed PR implementing this: https://github.com/google/googletest/pull/1592. Would you be interested in pull request with similar functionality?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.