Branch Coverage

third_party/modest/source/myurl/host.c
Criterion Covered Total %
branch 0 178 0.0


line true false branch
30 0 0 if(host)
43 0 0 if(host->type == MyURL_HOST_TYPE_DOMAIN)
46 0 0 if(host->type == MyURL_HOST_TYPE_OPAQUE)
54 0 0 if(host == NULL)
59 0 0 if(destroy_self) {
70 0 0 switch (host_from->type) {
87 0 0 if(ipv)
99 0 0 if(data[data_length] == '[') {
100 0 0 if(data[ (data_size - 1) ] != ']') {
112 0 0 if(is_special == false) {
127 0 0 if(status != MyURL_STATUS_OK) {
136 0 0 while(data_length < ascii_domain_size) {
137 0 0 if(myurl_resources_static_map_forbidden_host_code_point[ u_ascii_domain[data_length] ] != 0xff) {
147 0 0 if(myurl_host_ipv4_parser(&host->value.ipv, ascii_domain, ascii_domain_size, &failure) == MyURL_STATUS_OK) {
154 0 0 if(failure) {
189 0 0 while(length < data_size) {
190 0 0 if(myurl_resources_static_map_forbidden_host_code_point[ u_data[length] ] != 0xff) {
193 0 0 while(offset) {
196 0 0 if(data[offset] == '%') {
201 0 0 if(offset == 0 && data[offset] != '%') {
0 0 if(offset == 0 && data[offset] != '%') {
214 0 0 if(in_hex_val == NULL) {
234 0 0 if(data_size > 1) {
235 0 0 if(*data == '0' && (data[1] == 'x' || data[1] == 'X')) {
0 0 if(*data == '0' && (data[1] == 'x' || data[1] == 'X')) {
0 0 if(*data == '0' && (data[1] == 'x' || data[1] == 'X')) {
245 0 0 else if(*data == '0') {
259 0 0 if(r == 10) {
260 0 0 while(length < data_size) {
261 0 0 if(mycore_string_chars_num_map[ (unsigned char)data[length] ] == 0xff) {
270 0 0 else if(r == 16) {
271 0 0 while(length < data_size) {
272 0 0 if(mycore_string_chars_hex_map[ (unsigned char)data[length] ] == 0xff) {
282 0 0 while(length < data_size) {
283 0 0 if((unsigned char)data[length] < 0x30 || (unsigned char)data[length] > 0x37) {
0 0 if((unsigned char)data[length] < 0x30 || (unsigned char)data[length] > 0x37) {
298 0 0 if(failure)
311 0 0 while(data_length < data_size)
313 0 0 if(data[data_length] == '.')
316 0 0 if(part_count == 3) {
321 0 0 if((data_length - part_begin) == 0) {
325 0 0 if(myurl_host_ipv4_number_parser(&data[part_begin], (data_length - part_begin), &ipv->pieces[part_count], &validationErrorFlag)) {
336 0 0 if(data_length - part_begin) {
337 0 0 if(myurl_host_ipv4_number_parser(&data[part_begin], (data_length - part_begin), &ipv->pieces[part_count], &validationErrorFlag)) {
344 0 0 if(part_count == 0) {
354 0 0 for(size_t i = 0; i < part_count; i++) {
355 0 0 if(ipv->pieces[i] > 255) {
359 0 0 if(i != (part_count - 1)) {
360 0 0 if(failure)
369 0 0 if(ipv->pieces[(part_count - 1)] >= mycore_power(256, (5 - part_count))) {
370 0 0 if(failure)
381 0 0 for(size_t i = 0; i < part_count; i++) {
408 0 0 if(data[data_length] == ':') {
412 0 0 if(data_length >= data_size || data[data_length] != ':') {
0 0 if(data_length >= data_size || data[data_length] != ':') {
427 0 0 while(data_length < data_size)
430 0 0 if(piece_pointer == &ipv->pieces[8]) {
436 0 0 if(data[data_length] == ':') {
438 0 0 if(compress_pointer != NULL) {
457 0 0 while((i < 4) && (data_length < data_size)) {
0 0 while((i < 4) && (data_length < data_size)) {
458 0 0 if(mycore_string_chars_hex_map[ u_data[data_length] ] != 0xff) {
470 0 0 if(data_length < data_size)
472 0 0 if(data[data_length] == '.') {
474 0 0 if(i == 0) {
483 0 0 if(myurl_host_ipv6_ipv4_parser(ipv, &data[data_length], (data_size - data_length), &piece_pointer)) {
489 0 0 else if(data[data_length] == ':') {
494 0 0 if(data_length >= data_size) {
514 0 0 if(compress_pointer) {
519 0 0 while(i && swaps > 0) {
0 0 while(i && swaps > 0) {
534 0 0 if(compress_pointer == NULL && piece_pointer != &ipv->pieces[8]) {
0 0 if(compress_pointer == NULL && piece_pointer != &ipv->pieces[8]) {
548 0 0 if((*piece_pointer - ipv->pieces) > 6) {
557 0 0 while(data_length < data_size)
563 0 0 if(numbersSeen > 0)
565 0 0 if(data[data_length] != '.' || numbersSeen >= 4) {
0 0 if(data[data_length] != '.' || numbersSeen >= 4) {
572 0 0 if(data_length >= data_size)
577 0 0 if(mycore_string_chars_num_map[ u_data[data_length] ] == 0xff) {
583 0 0 while(data_length < data_size && mycore_string_chars_num_map[ u_data[data_length] ] != 0xff)
0 0 while(data_length < data_size && mycore_string_chars_num_map[ u_data[data_length] ] != 0xff)
589 0 0 if(value == -1) {
592 0 0 else if(value == 0) {
601 0 0 if(value > 255) {
617 0 0 if(numbersSeen == 2 || numbersSeen == 4) {
0 0 if(numbersSeen == 2 || numbersSeen == 4) {
622 0 0 if(data_length >= data_size && numbersSeen != 4) {
0 0 if(data_length >= data_size && numbersSeen != 4) {