LCOV - differential code coverage report
Current view: top level - src/interfaces/ecpg/test/sql - parser.pgc (source / functions) Coverage Total Hit UBC CBC
Current: Differential Code Coverage 16@8cea358b128 vs 17@8cea358b128 Lines: 100.0 % 20 20 20
Current Date: 2024-04-14 14:21:10 Functions: 100.0 % 1 1 1
Baseline: 16@8cea358b128 Branches: 56.2 % 32 18 14 18
Baseline Date: 2024-04-14 14:21:09 Line coverage date bins:
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed (240..) days: 100.0 % 20 20 20
Function coverage date bins:
(240..) days: 100.0 % 1 1 1
Branch coverage date bins:
(240..) days: 56.2 % 32 18 14 18

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : #include <stdio.h>
                                  2                 :                : #include <stdlib.h>
                                  3                 :                : #include <string.h>
                                  4                 :                : 
                                  5                 :                : /* test parser addition that merges two tokens into one */
                                  6                 :                : EXEC SQL INCLUDE ../regression;
                                  7                 :                : 
 5443 meskes@postgresql.or        8                 :CBC           1 : int main() {
                                  9                 :                :   EXEC SQL BEGIN DECLARE SECTION;
                                 10                 :                :     int item[3], ind[3], i;
                                 11                 :                :   EXEC SQL END DECLARE SECTION;
                                 12                 :                : 
 6238                            13                 :              1 :   ECPGdebug(1, stderr);
                                 14                 :              1 :   EXEC SQL CONNECT TO REGRESSDB1;
                                 15                 :                : 
                                 16                 :              1 :   EXEC SQL SET AUTOCOMMIT TO ON;
                                 17                 :                :   EXEC SQL WHENEVER SQLWARNING SQLPRINT;
                                 18                 :                :   EXEC SQL WHENEVER SQLERROR SQLPRINT;
                                 19                 :                : 
                                 20                 :              1 :   EXEC SQL CREATE TABLE T ( Item1 int, Item2 int );
                                 21   [ -  +  -  + ]:              1 : 
 3808 peter_e@gmx.net            22                 :              1 :   EXEC SQL INSERT INTO t
                                 23                 :                :            SELECT 1,nullif(y-1,0)
                                 24                 :                :              FROM generate_series(1,3) WITH ORDINALITY AS series(x,y);
 6238 meskes@postgresql.or       25   [ -  +  -  + ]:              1 : 
                                 26                 :              1 :   EXEC SQL SELECT Item2 INTO :item:ind FROM T ORDER BY Item2 NULLS LAST;
                                 27   [ -  +  -  + ]:              1 : 
                                 28         [ +  + ]:              4 :   for (i=0; i<3; i++)
 3808 peter_e@gmx.net            29         [ +  + ]:              3 :     printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
                                 30                 :                : 
 5654                            31                 :              1 :   EXEC SQL ALTER TABLE T ALTER Item1 TYPE bigint;
                                 32   [ -  +  -  + ]:              1 :   EXEC SQL ALTER TABLE T ALTER COLUMN Item2 SET DATA TYPE smallint;
                                 33   [ -  +  -  + ]:              1 : 
 6238 meskes@postgresql.or       34                 :              1 :   EXEC SQL DROP TABLE T;
                                 35   [ -  +  -  + ]:              1 : 
                                 36                 :              1 :   EXEC SQL DISCONNECT ALL;
                                 37   [ -  +  -  + ]:              1 : 
                                 38                 :              1 :   return 0;
                                 39                 :                : }
        

Generated by: LCOV version 2.1-beta2-3-g6141622