Skip to content
Snippets Groups Projects
  1. Aug 16, 2011
  2. Jul 14, 2011
  3. Jul 09, 2010
  4. Jun 10, 2010
  5. May 06, 2010
  6. Feb 11, 2010
  7. Feb 09, 2010
    • Russell Bryant's avatar
      Various updates to the unit test API. · bbed34f7
      Russell Bryant authored
      1) It occurred to me that the difference in usage between the error ast_str and
      the ast_test_update_status() usage has turned out to be a bit ambiguous in
      practice.  In a lot of cases, the same message was being sent to both.
      In other cases, it was only sent to one or the other.  My opinion now is that
      in every case, I think it makes sense to do both; we should output it to the
      CLI as well as save it off for logging purposes.
      
      This change results in most of the changes in this diff, since it required
      changes to all existing unit tests.  It also allowed for some simplifications
      of unit test API implementation code.
      
      2) Update ast_test_status_update() to include the file, function, and line
      number for the code providing the update.
      
      3) There are some formatting tweaks here and there.  Hopefully they aren't too
      distracting for code review purposes.  Reviewboard's diff viewer seems to do a
      pretty good job of pointing out when something is a whitespace change.
      
      4) I moved the md5_test and sha1_test into the test_utils module.  It seemed
      like a better approach since these tests are so tiny.
      
      5) I changed the number of nodes used in heap_test_2 from 1 million to
      100 thousand.  The only reason for this was to reduce the time it took
      for this test to run.
      
      6) Remove an unused function prototype that was at the bottom of utils.h.
      
      7) Simplify test_insert() using the LIST_INSERT_SORTALPHA() macro.  The one
      minor difference in behavior is that it no longer checks for a test registered
      with the same name.
      
      8) Expand the code in test_alloc() to provide specific error messages for each
      failure case, to clearly inform developers if they forget to set the name,
      summary, description, etc.
      
      9) Tweak the output of the "test show registered" CLI command.  I swapped the
      name and category to have the category first.  It seemed more natural since
      that is the sort key.
      
      10) Don't output the status ast_str in the "test show results" CLI command.
      This is going to tend to be pretty verbose, so just leave that for the
      detailed test logs (test generate results).
      
      Review: https://reviewboard.asterisk.org/r/493/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      bbed34f7
  8. Jan 25, 2010
  9. Dec 22, 2009
    • David Vossel's avatar
      Unit Test Framework API · 73cb2d50
      David Vossel authored
      The Unit Test Framework is a new API that manages registration and
      execution of unit tests in Asterisk with the purpose of verifying the
      operation of C functions.  The Framework consists of a single test
      manager accompanied by a list of registered test functions defined
      within the code.  A test is defined, registered, and unregistered
      from the framework using a set of macros which allow the test code
      to only be compiled within asterisk when the TEST_FRAMEWORK flag is
      enabled in menuselect.  This allows the test code to exist in the
      same file as the C functions it intends to verify.  Registered tests
      may be viewed and executed via a set of new CLI commands.  CLI commands
      are also present for generating and exporting test results into xml
      and txt formats.
      
      For more information and use cases please refer to the documentation
      provided at the beginning of the test.h file.
      
      Review: https://reviewboard.asterisk.org/r/447/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@236027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      73cb2d50
  10. Apr 10, 2009
  11. Feb 17, 2009
Loading