mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Add rudimentary test mocking support.
This is not the most beautiful possible implementation (it requires decorating mockable functions with ugly macros), but it actually works, and is portable across multiple compilers and architectures.
This commit is contained in:
@@ -14,3 +14,15 @@
|
||||
tests (and a new src/or/tor-cov target) to build with gcov test
|
||||
coverage support.
|
||||
|
||||
o Testing:
|
||||
|
||||
- We now have rudimentary function mocking support that our unit
|
||||
tests can use to test functions in isolation. Function mocking
|
||||
lets the tests temporarily replace a function's dependencies with
|
||||
stub functions, so that the tests can check the function without
|
||||
invoking the other functions it calls.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user