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

Adding ability to mock extern "C" functions #304

Merged
merged 2 commits into from Sep 16, 2017

Conversation

@DavidDeSimone
Copy link
Collaborator

@DavidDeSimone DavidDeSimone commented Sep 13, 2017

Adding ability to mock extern "C" functions defined by the emacs C layer. This is done via a mocking library using proc macros. Adding a basic test as an example.

This is the solution that was discussed in #299 It is using a library that I maintain, which can be found here: https://github.com/DavidDeSimone/mock_derive

…yer. This is done via a mocking library using proc macros. Adding a basic test as an example.
@brotzeit
Copy link
Member

@brotzeit brotzeit commented Sep 15, 2017

I don't feel confident enough to review PRs. Hopefully somebody with more experience has the time to take a look at it soon.

@DavidDeSimone
Copy link
Collaborator Author

@DavidDeSimone DavidDeSimone commented Sep 15, 2017

No problem @brotzeit . As a call out, this crate should only affect the app when running in test configuration. It should have zero affect on symbols/variables/etc when running cargo build or cargo build --release

Copy link
Collaborator

@Wilfred Wilfred left a comment

LGTM :)

I'm sure we'll polish this as we expand our test coverage, but it is absolutely brilliant to have everything we need to write unit tests of our low-level code :)

@Wilfred Wilfred merged commit ef24390 into remacs:master Sep 16, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants