diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-10-22 17:09:52 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-10-22 17:09:52 +0000 |
commit | 1b10edb79b2dc27cf96d8264d0aeec58e567caf6 (patch) | |
tree | 368700998ea792aa78cde817c173cfd58eb1691d | |
parent | 10e821a86da69970349bdaf25235a8e6c6cec382 (diff) |
Prevent multiple runs of event_sub_test from producing false failure results.
The array of test subscriptions was declared "static," meaning that the
data.count field would retain its value between runs of the test. After the
first test run, this would result in false reports of test failures.
I chose to just remove the "static" keyword from the structure since it's not
a huge deal to construct this structure during each run of the test. Another
alternative would have been to zero out the data.count fields of each test
subscription instead.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@292741 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | tests/test_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_event.c b/tests/test_event.c index 82ef29bb3..4331d742f 100644 --- a/tests/test_event.c +++ b/tests/test_event.c @@ -253,7 +253,7 @@ AST_TEST_DEFINE(event_sub_test) struct ast_event *event; int i; enum ast_event_subscriber_res sub_res; - static struct { + struct { struct ast_event_sub *sub; struct event_sub_data data; const unsigned int expected_count; |