Branch Coverage

date.c
Criterion Covered Total %
branch 3 218 1.3


line true false branch
100 0 0 N = va_arg(ap, int);
101 0 0 min = va_arg(ap, int);
102 0 0 max = va_arg(ap, int);
103 0 0 nextC = va_arg(ap, int);
104 0 0 pVal = va_arg(ap, int*);
106 0 0 while( N-- ){
107 0 0 if( !isdigit(*zDate) ){
113 0 0 if( valmax || (nextC!=0 && nextC!=*zDate) ){
0 0 if( valmax || (nextC!=0 && nextC!=*zDate) ){
0 0 if( valmax || (nextC!=0 && nextC!=*zDate) ){
0 0 if( valmax || (nextC!=0 && nextC!=*zDate) ){
119 0 0 }while( nextC );
148 0 0 while( isspace(*zDate) ){ zDate++; }
150 0 0 if( *zDate=='-' ){
152 0 0 }else if( *zDate=='+' ){
158 0 0 if( getDigits(zDate, 2, 0, 14, ':', &nHr, 2, 0, 59, 0, &nMn)!=2 ){
163 0 0 while( isspace(*zDate) ){ zDate++; }
177 0 0 if( getDigits(zDate, 2, 0, 24, ':', &h, 2, 0, 59, 0, &m)!=2 ){
181 0 0 if( *zDate==':' ){
183 0 0 if( getDigits(zDate, 2, 0, 59, 0, &s)!=1 ){
187 0 0 if( *zDate=='.' && isdigit(zDate[1]) ){
0 0 if( *zDate=='.' && isdigit(zDate[1]) ){
190 0 0 while( isdigit(*zDate) ){
205 0 0 if( parseTimezone(zDate, p) ) return 1;
219 0 0 if( p->validJD ) return;
220 0 0 if( p->validYMD ){
229 0 0 if( M<=2 ){
240 0 0 if( p->validHMS ){
242 0 0 if( p->validTZ ){
265 0 0 if( zDate[0]=='-' ){
271 0 0 if( getDigits(zDate,4,0,9999,'-',&Y,2,1,12,'-',&M,2,1,31,0,&D)!=3 ){
275 0 0 while( isspace(*zDate) ){ zDate++; }
276 0 0 if( parseHhMmSs(zDate, p)==0 ){
278 0 0 }else if( *zDate==0 ){
285 0 0 p->Y = neg ? -Y : Y;
288 0 0 if( p->validTZ ){
312 0 0 if( parseYyyyMmDd(zDate,p)==0 ){
314 0 0 }else if( parseHhMmSs(zDate, p)==0 ){
316 0 0 }else if( sqliteStrICmp(zDate,"now")==0){
318 0 0 if( sqliteOsCurrentTime(&r)==0 ){
324 0 0 }else if( sqliteIsNumber(zDate) ){
337 0 0 if( p->validYMD ) return;
338 0 0 if( !p->validJD ){
352 0 0 p->M = E<14 ? E-1 : E-13;
353 0 0 p->Y = p->M>2 ? C - 4716 : C - 4715;
363 0 0 if( p->validHMS ) return;
403 0 0 if( x.Y<1971 || x.Y>=2038 ){
0 0 if( x.Y<1971 || x.Y>=2038 ){
462 0 0 for(n=0; n
0 0 for(n=0; n
473 0 0 if( strcmp(z, "localtime")==0 ){
488 0 0 if( strcmp(z, "unixepoch")==0 && p->validJD ){
0 0 if( strcmp(z, "unixepoch")==0 && p->validJD ){
492 0 0 }else if( strcmp(z, "utc")==0 ){
511 0 0 if( strncmp(z, "weekday ", 8)==0 && getValue(&z[8],&r)>0
0 0 if( strncmp(z, "weekday ", 8)==0 && getValue(&z[8],&r)>0
512 0 0 && (n=r)==r && n>=0 && r<7 ){
0 0 && (n=r)==r && n>=0 && r<7 ){
0 0 && (n=r)==r && n>=0 && r<7 ){
520 0 0 if( Z>n ) Z -= 7;
534 0 0 if( strncmp(z, "start of ", 9)!=0 ) break;
542 0 0 if( strcmp(z,"month")==0 ){
545 0 0 }else if( strcmp(z,"year")==0 ){
550 0 0 }else if( strcmp(z,"day")==0 ){
568 0 0 if( n<=0 ) break;
569 0 0 if( z[n]==':' ){
578 0 0 if( !isdigit(*z2) ) z2++;
580 0 0 if( parseHhMmSs(z2, &tx) ) break;
585 0 0 if( z[0]=='-' ) tx.rJD = -tx.rJD;
593 0 0 while( isspace(z[0]) ) z++;
595 0 0 if( n>10 || n<3 ) break;
0 0 if( n>10 || n<3 ) break;
596 0 0 if( z[n-1]=='s' ){ z[n-1] = 0; n--; }
599 0 0 if( n==3 && strcmp(z,"day")==0 ){
0 0 if( n==3 && strcmp(z,"day")==0 ){
601 0 0 }else if( n==4 && strcmp(z,"hour")==0 ){
0 0 }else if( n==4 && strcmp(z,"hour")==0 ){
603 0 0 }else if( n==6 && strcmp(z,"minute")==0 ){
0 0 }else if( n==6 && strcmp(z,"minute")==0 ){
605 0 0 }else if( n==6 && strcmp(z,"second")==0 ){
0 0 }else if( n==6 && strcmp(z,"second")==0 ){
607 0 0 }else if( n==5 && strcmp(z,"month")==0 ){
0 0 }else if( n==5 && strcmp(z,"month")==0 ){
611 0 0 x = p->M>0 ? (p->M-1)/12 : (p->M-12)/12;
617 0 0 if( y!=r ){
620 0 0 }else if( n==4 && strcmp(z,"year")==0 ){
0 0 }else if( n==4 && strcmp(z,"year")==0 ){
646 0 0 if( argc==0 ) return 1;
647 0 0 if( argv[0]==0 || parseDateOrTime(argv[0], p) ) return 1;
0 0 if( argv[0]==0 || parseDateOrTime(argv[0], p) ) return 1;
648 0 0 for(i=1; i
649 0 0 if( argv[i]==0 || parseModifier(argv[i], p) ) return 1;
0 0 if( argv[i]==0 || parseModifier(argv[i], p) ) return 1;
667 0 0 if( isDate(argc, argv, &x)==0 ){
680 0 0 if( isDate(argc, argv, &x)==0 ){
696 0 0 if( isDate(argc, argv, &x)==0 ){
711 0 0 if( isDate(argc, argv, &x)==0 ){
744 0 0 if( argv[0]==0 || isDate(argc-1, argv+1, &x) ) return;
0 0 if( argv[0]==0 || isDate(argc-1, argv+1, &x) ) return;
745 0 0 for(i=0, n=1; zFmt[i]; i++, n++){
746 0 0 if( zFmt[i]=='%' ){
778 0 0 if( n
782 0 0 if( z==0 ) return;
786 0 0 for(i=j=0; zFmt[i]; i++){
787 0 0 if( zFmt[i]!='%' ){
810 0 0 if( zFmt[i]=='W' ){
838 0 0 if( z!=zBuf ){
867 125 25 for(i=0; i
870 125 0 if( aFuncs[i].xFunc ){