Branch Coverage

third_party/modest/source/mycss/tokenizer.c
Criterion Covered Total %
branch 43 270 15.9


line true false branch
30 0 129 if(entry->current_buffer == NULL)
34 129 0 if(entry->first_buffer == NULL)
37 74 55 if(entry->token == NULL) {
40 0 74 if(entry->token == NULL)
60 129 0 if(entry->encoding == MyENCODING_UTF_16LE || entry->encoding == MyENCODING_UTF_16BE)
0 129 if(entry->encoding == MyENCODING_UTF_16LE || entry->encoding == MyENCODING_UTF_16BE)
72 718 129 while (mt->length < mt->size) {
78 0 129 while(entry->current_buffer);
90 128 1 if(entry->state != MyCSS_TOKENIZER_STATE_DATA)
113 0 0 if(css_minus_offset == 0)
116 0 0 if(css_offset >= css_minus_offset)
124 0 0 while(buffer && buffer->offset > position)
0 0 while(buffer && buffer->offset > position)
127 0 0 if(buffer == NULL)
166 22 0 while(css_offset < css_size)
168 22 0 if(mycss_begin_chars_state_map[ u_css[css_offset] ] != MyCSS_TOKENIZER_STATE_WHITESPACE)
173 22 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
202 7 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
216 39 0 if(mycss_chars_name_code_point_map[ u_css[css_offset] ] != 0xff)
224 0 0 else if(css[css_offset] == '\\') {
227 0 0 if(css_offset >= css_size) {
232 0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
238 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
254 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
266 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
274 0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
278 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
299 0 0 if(css[css_offset] == '=') {
310 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
333 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
348 1 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
363 1 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
375 0 5 if(css[css_offset] == '=') {
386 5 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
398 1 1 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
1 0 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
404 0 1 else if(css[css_offset] == '.') {
413 1 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
423 0 0 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
0 0 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
433 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
451 4 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
467 0 0 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
0 0 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
473 0 0 else if(css[css_offset] == '.') {
484 0 0 else if(css[css_offset] == '-') {
492 0 0 else if(mycss_begin_chars_state_map[ u_css[css_offset] ] == MyCSS_TOKENIZER_STATE_NAME_START_CODE_POINT) {
498 0 0 else if(css[css_offset] == '\\') {
509 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
519 0 0 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
0 0 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
529 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
540 0 0 if(css[css_offset] == '>') {
546 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
550 0 0 else if(mycss_begin_chars_state_map[ ((const unsigned char *)css)[css_offset] ] == MyCSS_TOKENIZER_STATE_NAME_START_CODE_POINT) {
556 0 0 else if(css[css_offset] == '\\') {
565 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
576 0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
580 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
597 0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
601 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
622 27 0 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
0 27 if(css[css_offset] >= '0' && css[css_offset] <= '9') {
632 27 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
646 0 0 if(css[css_offset] == '*') {
655 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
666 0 0 while(css_offset < css_size)
668 0 0 if(css[css_offset] == '/') {
669 0 0 if(css_offset == 0)
673 0 0 while(buffer && buffer->size == 0)
0 0 while(buffer && buffer->size == 0)
676 0 0 if(buffer == NULL) {
682 0 0 if(buffer->data[ (buffer->size - 1) ] == '*') {
688 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
694 0 0 else if(css[ (css_offset - 1) ] == '*') {
700 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
722 7 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
737 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
749 0 0 if(css[css_offset] == '!') {
758 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
768 0 0 if(css[css_offset] == '-') {
776 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
787 0 0 if(css[css_offset] == '-') {
793 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
801 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
816 0 0 if(css[css_offset] == '-') {
821 0 0 else if(css[css_offset] == '\\') {
826 0 0 else if(mycss_begin_chars_state_map[ ((const unsigned char *)css)[css_offset] ] == MyCSS_TOKENIZER_STATE_NAME_START_CODE_POINT) {
836 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
846 0 0 if(mycss_begin_chars_state_map[ ((const unsigned char *)css)[css_offset] ] == MyCSS_TOKENIZER_STATE_NAME_START_CODE_POINT) {
852 0 0 else if(css[css_offset] == '\\') {
861 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
872 0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
876 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
893 0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
897 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
918 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
933 10 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
945 0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
0 0 if(css[css_offset] == '\n' || css[css_offset] == '\r' || css[css_offset] == 0x0C) {
949 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
970 1 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
982 0 1 if(css[css_offset] == '=') {
993 1 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
1008 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
1023 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
1047 0 23 if(css[css_offset] == '+') {
1050 0 0 if(css_offset >= css_size) {
1055 0 0 if(mycore_string_chars_hex_map[ (const unsigned char)(css[css_offset]) ] != 0xff ||
0 0 if(mycore_string_chars_hex_map[ (const unsigned char)(css[css_offset]) ] != 0xff ||
1078 0 0 if(mycore_string_chars_hex_map[ (const unsigned char)(css[css_offset]) ] != 0xff ||
0 0 if(mycore_string_chars_hex_map[ (const unsigned char)(css[css_offset]) ] != 0xff ||
1112 0 0 if(css[css_offset] == '=') {
1118 0 0 else if(css[css_offset] == '|') {
1129 0 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
1141 0 1 if(css[css_offset] == '=') {
1152 1 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
1166 14 0 while (css_offset < css_size)
1168 14 0 if(u_css[css_offset] < 128)
1173 14 0 MyCSS_TOKEN_READY_CALLBACK_FUNCTION(entry, token);
1193 0 74 if(mycss->parse_state_func == NULL)
1363 74 0 if(mycss->parse_state_func) {