[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #16869 [Core Tor/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:  Medium        |      Milestone:  Tor: 0.2.???
Component:  Core Tor/Tor  |        Version:
 Severity:  Blocker       |     Resolution:
 Keywords:  unittests     |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------
Changes (by nherring):

 * severity:   => Blocker


Comment:

 I tried emulating this with
 `--regex-c='/MOCK_IMPL\([^,]+,\W*(\w+)\W*,/\1/f/'` but there's a
 limitation that ctags only looks at one line, and these definitions often
 wrap. If you use `-IMOCK_DECL -IMOCK_IMPL`, the tags will exist but as
 variables rather than functions. If you add this as a `.ctags` file in the
 root, it'll map to everything, and thus also hide the actual definitions
 of `MOCK_DECL` and `MOCK_IMPL` in `src/common/testsupport.h`.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16869#comment:4>
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