[asterisk-dev] [Code Review] Unit Test Framework

David Vossel dvossel at digium.com
Thu Dec 17 12:39:39 CST 2009



> On 2009-12-17 12:18:28, Matthew Nicholson wrote:
> > /trunk/include/asterisk/test.h, lines 109-110
> > <https://reviewboard.asterisk.org/r/447/diff/3/?file=7574#file7574line109>
> >
> >     Have you attempted to compile this with TEST_FRAMEWORK disabled?  I cannot get my local test code I have been using to test the comma issue to compile with a similar setup.

you are correct, it doesn't compile now that I changed the DEFINE macros.  I didn't think about this, but I don't think it's possible to have something like a #ifdef within a macro. This is going to need to be re-thought.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/447/#review1329
-----------------------------------------------------------


On 2009-12-17 12:07:21, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/447/
> -----------------------------------------------------------
> 
> (Updated 2009-12-17 12:07:21)
> 
> 
> Review request for Asterisk Developers and Russell Bryant.
> 
> 
> Summary
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   /trunk/build_tools/cflags-devmode.xml 235408 
>   /trunk/include/asterisk/_private.h 235408 
>   /trunk/include/asterisk/test.h PRE-CREATION 
>   /trunk/main/asterisk.c 235408 
>   /trunk/main/test.c PRE-CREATION 
>   /trunk/tests/test_heap.c 235408 
> 
> Diff: https://reviewboard.asterisk.org/r/447/diff
> 
> 
> Testing
> -------
> 
> test_heap.c has been modified to take advantage of the Test Framework.  I have executed and generated reports for these tests. 
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list