MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / test_bracket_nested

Function test_bracket_nested

modules/rtpengine/test/test.c:119–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119static void test_bracket_nested(void)
120{
121 bencode_buffer_t buf;
122 int t = 1;
123
124 /* 1. List containing nested list: [a [b c] d] */
125 ok(bencode_buffer_init(&buf) == 0, "test-bracket-nested-%d", t++);
126 ok(check_bencode("a [b c] d", 9,
127 "l1:al1:b1:ce1:de", &buf, 0),
128 "test-bracket-nested-%d", t++);
129 bencode_buffer_free(&buf);
130
131 /* 2. Nested empty brackets */
132 ok(bencode_buffer_init(&buf) == 0, "test-bracket-nested-%d", t++);
133 ok(check_bencode("[] []", 5,
134 "lleleee", &buf, 0) ||
135 check_bencode("[] []", 5,
136 "llelee", &buf, 0),
137 "test-bracket-nested-%d", t++);
138 bencode_buffer_free(&buf);
139}
140
141static void test_bracket_security(void)
142{

Callers 1

mod_testsFunction · 0.85

Calls 3

bencode_buffer_initFunction · 0.85
check_bencodeFunction · 0.85
bencode_buffer_freeFunction · 0.85

Tested by

no test coverage detected