[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #16869 [Tor]: Consider changing MOCK_DECL and MOCK_IMPL so that ctags still finds mocked functions
#16869: Consider changing MOCK_DECL and MOCK_IMPL so that ctags still finds mocked
functions
-----------------------+---------------------
Reporter: isis | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor | Version:
Keywords: unittests | Actual Points:
Parent ID: | Points:
-----------------------+---------------------
Everytime someone creates new unittests for tor which mock a function with
`MOCK_IMPL` and `MOCK_DECL`, it breaks looking up the real function with
ctags/etags. I feel that this is really bad for enabling
newcomers/outsiders to easily review our code (and thus this is
discouraging me from mocking the functions that I need to in order to have
100% coverage for my code, because I feel I'm making tor's codebase
uglier).
asn suggested that we fix it by figuring out which flags we need to give
to ctags/etags to get it to work, and add whatever those flags are to the
`tags` Make target. I think it also should be possible to redefine those
macros such that they rewrite the function signature whenever they see it,
without actually needing to wrap around/mangle the real declaration and
implementation.
Is this something that other people think is worth doing?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16869>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs