[asterisk-dev] [Code Review] Adds support to GROUP_MATCH_COUNT for regex matching on category
Russell Bryant
russell at digium.com
Fri Feb 12 20:07:20 CST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/503/#review1509
-----------------------------------------------------------
/trunk/tests/test_app.c
<https://reviewboard.asterisk.org/r/503/#comment3389>
Put your name and such here
/trunk/tests/test_app.c
<https://reviewboard.asterisk.org/r/503/#comment3393>
trailing whitespace
/trunk/tests/test_app.c
<https://reviewboard.asterisk.org/r/503/#comment3390>
This can be simplified down to:
\author Jeff Peeler <jpeeler at digium.com>
/trunk/tests/test_app.c
<https://reviewboard.asterisk.org/r/503/#comment3391>
This should be the enum, not int
/trunk/tests/test_app.c
<https://reviewboard.asterisk.org/r/503/#comment3392>
check for allocation failure
/trunk/tests/test_app.c
<https://reviewboard.asterisk.org/r/503/#comment3394>
You could do something to reduce code duplication here. Define a structure that includes each of the combinations of arguments you'd like to provide, as well as the expected count. Then, instead of having to add another if block here, you can just have a loop over an array of those structures. That also makes it so adding another test case is another element in the array, instead of also having to add code later in the function.
- Russell
On 2010-02-12 17:34:04, Jeff Peeler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/503/
> -----------------------------------------------------------
>
> (Updated 2010-02-12 17:34:04)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> Mostly what needs reviewing is the new unit test, although it is pretty simple.
>
>
> This addresses bug 16642.
> https://issues.asterisk.org/view.php?id=16642
>
>
> Diffs
> -----
>
> /trunk/main/app.c 246545
> /trunk/tests/test_app.c PRE-CREATION
>
> Diff: https://reviewboard.asterisk.org/r/503/diff
>
>
> Testing
> -------
>
> Unit test created and passes all tests. Perhaps could be expanded upon, but matching counts work as expected.
>
>
> Thanks,
>
> Jeff
>
>
More information about the asterisk-dev
mailing list