Skip to content
Snippets Groups Projects
  1. Jul 16, 2014
  2. Jun 24, 2014
  3. Apr 15, 2014
    • dana koch's avatar
      Uplift status.c unit test coverage with new test cases and macros. · 3ce39847
      dana koch authored and Nick Mathewson's avatar Nick Mathewson committed
      A new set of unit test cases are provided, as well as introducing
      an alternative paradigm and macros to support it. Primarily, each test
      case is given its own namespace, in order to isolate tests from each
      other. We do this by in the usual fashion, by appending module and
      submodule names to our symbols. New macros assist by reducing friction
      for this and other tasks, like overriding a function in the global
      namespace with one in the current namespace, or declaring integer
      variables to assist tracking how many times a mock has been called.
      
      A set of tests for a small-scale module has been included in this
      commit, in order to highlight how the paradigm can be used. This
      suite gives 100% coverage to status.c in test execution.
      3ce39847
  4. Apr 08, 2014
  5. Apr 02, 2014
  6. Feb 28, 2014
  7. Feb 12, 2014
  8. Feb 06, 2014
  9. Feb 04, 2014
  10. Jan 30, 2014
  11. Nov 18, 2013
  12. Oct 11, 2013
  13. Sep 19, 2013
  14. Aug 15, 2013
  15. Jul 19, 2013
  16. Jul 18, 2013
  17. Jul 10, 2013
    • Nick Mathewson's avatar
      Add some basic unit tests for the circuit map data structure. · ec6c155f
      Nick Mathewson authored
      These show off the new mocking code by mocking the circuitmux code
      so that we can test the circuit map code in isolation.
      ec6c155f
    • Nick Mathewson's avatar
      Coverage support: build with --enable-coverage to have tests run with gcov · 17e9fc09
      Nick Mathewson authored
      If you pass the --enable-coverage flag on the command line, we build
      our testing binaries with appropriate options eo enable coverage
      testing.  We also build a "tor-cov" binary that has coverage enabled,
      for integration tests.
      
      On recent OSX versions, test coverage only works with clang, not gcc.
      So we warn about that.
      
      Also add a contrib/coverage script to actually run gcov with the
      appropriate options to generate useful .gcov files.  (Thanks to
      automake, the .o files will not have the names that gcov expects to
      find.)
      
      Also, remove generated gcda and gcno files on clean.
      17e9fc09
    • Nick Mathewson's avatar
      Start work on fancy compiler tricks to expose extra stuff to our tests · f7d654b8
      Nick Mathewson authored
      This is mainly a matter of automake trickery: we build each static
      library in two versions now: one with the TOR_UNIT_TESTS macro
      defined, and one without.  When TOR_UNIT_TESTS is defined, we can
      enable mocking and expose more functions. When it's not defined, we
      can lock the binary down more.
      
      The alternatives would be to have alternate build modes: a "testing
      configuration" for building the libraries with test support, and a
      "production configuration" for building them without.  I don't favor
      that approach, since I think it would mean more people runnning
      binaries build for testing, or more people not running unit tests.
      f7d654b8
  18. Jun 12, 2013
  19. Jun 10, 2013
  20. May 31, 2013
  21. Jan 16, 2013
  22. Jan 03, 2013
  23. Nov 15, 2012
  24. Oct 11, 2012
  25. Aug 09, 2012
Loading