[asterisk-dev] [Code Review] Unit Test: verify aggregate device state mapping and device to extension state mapping.

Mark Michelson mmichelson at digium.com
Wed Feb 17 11:55:59 CST 2010


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

Ship it!


It looks good aside from the two minor suggestions I make below. Good job and great idea for a unit test!


/trunk/tests/test_devicestate.c
<https://reviewboard.asterisk.org/r/516/#comment3435>

    I think i and j should be of type enum ast_device_state instead of ints.



/trunk/tests/test_devicestate.c
<https://reviewboard.asterisk.org/r/516/#comment3434>

    I'd recommend, if possible, building on a 32-bit machine just to be sure that using %lu for a size_t doesn't cause a compiler warning. I've gotten in the habit of just casting them to an int and using %d in the format string.
    
    I think, though, that a size_t is generally a word-sized unsigned quantity, so %lu will probably work. I'd still double-check to be sure though.


- Mark


On 2010-02-17 11:29:02, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/516/
> -----------------------------------------------------------
> 
> (Updated 2010-02-17 11:29:02)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> New unit test to verify aggregate device state mapping and device to extension state mapping.
> 
> 
> Diffs
> -----
> 
>   /trunk/tests/test_devicestate.c PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/516/diff
> 
> 
> Testing
> -------
> 
> test runs and completes as expected.
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list