[asterisk-dev] [Code Review] Unit test for ast_str API
David Vossel
dvossel at digium.com
Wed Feb 17 16:25:19 CST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/517/#review1536
-----------------------------------------------------------
/trunk/tests/test_strings.c
<https://reviewboard.asterisk.org/r/517/#comment3439>
heap string here not stack string.
/trunk/tests/test_strings.c
<https://reviewboard.asterisk.org/r/517/#comment3440>
heap string here too
- David
On 2010-02-17 15:55:19, Mark Michelson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/517/
> -----------------------------------------------------------
>
> (Updated 2010-02-17 15:55:19)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> A test for basic operations of the ast_str API. Here is an outline of the tests that are run.
>
> The tests run are outlined in comments in the code. In short, we call ast_str_set and ast_str_append with various-sized strings using both a stack-allocated and heap-allocated ast_str.
>
>
> Diffs
> -----
>
> /trunk/tests/test_strings.c PRE-CREATION
>
> Diff: https://reviewboard.asterisk.org/r/517/diff
>
>
> Testing
> -------
>
> The unit test passes.
>
> I should note though that while writing the unit test, the test failed on several occasions. In one case, this was due to my misinterpretation of ast_str documentation, so I updated it (trunk rev. 246985). In another case, I found two actual bugs in the code that needed to be fixed (trunk rev. 247335). Testing is good!
>
>
> Thanks,
>
> Mark
>
>
More information about the asterisk-dev
mailing list