fancy_testing 1.0 KB

12345678910111213141516171819202122232425262728
  1. o Build features:
  2. - Tor now builds each source file in two modes: a mode that avoids
  3. exposing identifiers needlessly, and another mode that exposes
  4. more identifiers for testing. This lets the compiler do better at
  5. optimizing the production code, while enabling us to take more
  6. radical measures to let the unit tests test things.
  7. - The production builds no longer include functions used only
  8. in the unit tests; all functions exposed from a module for
  9. unit-testing only are now static in production builds.
  10. - Add an --enable-coverage configuration option to make the unit
  11. tests (and a new src/or/tor-cov target) to build with gcov test
  12. coverage support.
  13. o Testing:
  14. - We now have rudimentary function mocking support that our unit
  15. tests can use to test functions in isolation. Function mocking
  16. lets the tests temporarily replace a function's dependencies with
  17. stub functions, so that the tests can check the function without
  18. invoking the other functions it calls.