LCOV - differential code coverage report
Current view: top level - src/interfaces/ecpg/test/preproc - type.pgc (source / functions) Coverage Total Hit UBC CBC
Current: c70b6db34ffeab48beef1fb4ce61bcad3772b8dd vs 06473f5a344df8c9594ead90a609b86f6724cff8 Lines: 68.0 % 25 17 8 17
Current Date: 2025-09-06 07:49:51 +0900 Functions: 100.0 % 1 1 1
Baseline: lcov-20250907-010129-baseline Branches: 50.0 % 8 4 4 4
Baseline Date: 2025-09-05 08:21:35 +0100 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(360..) days: 68.0 % 25 17 8 17
Function coverage date bins:
(360..) days: 100.0 % 1 1 1
Branch coverage date bins:
(360..) days: 50.0 % 8 4 4 4

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : #include <stdio.h>
                                  2                 :                : #include <stdlib.h>
                                  3                 :                : 
                                  4                 :                : EXEC SQL include ../regression;
                                  5                 :                : 
                                  6                 :                : EXEC SQL typedef long mmInteger;
                                  7                 :                : EXEC SQL typedef char mmChar;
                                  8                 :                : EXEC SQL typedef short access;  /* matches an unreserved SQL keyword */
                                  9                 :                : EXEC SQL typedef access access_renamed;
                                 10                 :                : 
                                 11                 :                : exec sql type string is char[11];
                                 12                 :                : typedef char string[11];
                                 13                 :                : 
                                 14                 :                : exec sql type c is char reference;
                                 15                 :                : typedef char* c;
                                 16                 :                : 
                                 17                 :                : EXEC SQL BEGIN DECLARE SECTION;
                                 18                 :                : struct TBempl
                                 19                 :                : {
                                 20                 :                :   mmInteger idnum;
                                 21                 :                :   mmChar name[21];
                                 22                 :                :   access accs;
                                 23                 :                : };
                                 24                 :                : EXEC SQL END DECLARE SECTION;
                                 25                 :                : 
                                 26                 :                : int
 6939 meskes@postgresql.or       27                 :CBC           1 : main (void)
                                 28                 :                : {
                                 29                 :                :   EXEC SQL BEGIN DECLARE SECTION;
                                 30                 :                :   struct TBempl empl;
                                 31                 :                :   string str;
 1153 tgl@sss.pgh.pa.us          32                 :              1 :   access accs_val = 320;
 6939 meskes@postgresql.or       33                 :              1 :   c ptr = NULL;
                                 34                 :                :   struct varchar
                                 35                 :                :   {
                                 36                 :                :     int len;
                                 37                 :                :     char text[10];
                                 38                 :                :   } vc;
                                 39                 :                :   EXEC SQL END DECLARE SECTION;
                                 40                 :                : 
                                 41                 :                :   EXEC SQL var vc is varchar[10];
                                 42                 :              1 :   ECPGdebug (1, stderr);
                                 43                 :                : 
                                 44                 :              1 :   empl.idnum = 1;
                                 45                 :              1 :   EXEC SQL connect to REGRESSDB1;
                                 46         [ -  + ]:              1 :   if (sqlca.sqlcode)
                                 47                 :                :     {
 6939 meskes@postgresql.or       48                 :UBC           0 :       printf ("connect error = %ld\n", sqlca.sqlcode);
                                 49                 :              0 :       exit (sqlca.sqlcode);
                                 50                 :                :     }
                                 51                 :                : 
 6939 meskes@postgresql.or       52                 :CBC           1 :   EXEC SQL create table empl
                                 53                 :                :     (idnum integer, name char(20), accs smallint, string1 char(10), string2 char(10), string3 char(10));
                                 54         [ -  + ]:              1 :   if (sqlca.sqlcode)
                                 55                 :                :     {
 6939 meskes@postgresql.or       56                 :UBC           0 :       printf ("create error = %ld\n", sqlca.sqlcode);
                                 57                 :              0 :       exit (sqlca.sqlcode);
                                 58                 :                :     }
                                 59                 :                : 
 1153 tgl@sss.pgh.pa.us          60                 :CBC           1 :   EXEC SQL insert into empl values (1, 'user name', :accs_val, 'first str', 'second str', 'third str');
 6939 meskes@postgresql.or       61         [ -  + ]:              1 :   if (sqlca.sqlcode)
                                 62                 :                :     {
 6939 meskes@postgresql.or       63                 :UBC           0 :       printf ("insert error = %ld\n", sqlca.sqlcode);
                                 64                 :              0 :       exit (sqlca.sqlcode);
                                 65                 :                :     }
                                 66                 :                : 
 6939 meskes@postgresql.or       67                 :CBC           1 :   EXEC SQL select idnum, name, accs, string1, string2, string3
                                 68                 :                :     into :empl, :str, :ptr, :vc
                                 69                 :                :     from empl
                                 70                 :                :     where idnum =:empl.idnum;
                                 71         [ -  + ]:              1 :   if (sqlca.sqlcode)
                                 72                 :                :     {
 6939 meskes@postgresql.or       73                 :UBC           0 :       printf ("select error = %ld\n", sqlca.sqlcode);
                                 74                 :              0 :       exit (sqlca.sqlcode);
                                 75                 :                :     }
 6939 meskes@postgresql.or       76                 :CBC           1 :   printf ("id=%ld name='%s' accs=%d str='%s' ptr='%s' vc='%10.10s'\n", empl.idnum, empl.name, empl.accs, str, ptr, vc.text);
                                 77                 :                : 
                                 78                 :              1 :   EXEC SQL disconnect;
                                 79                 :                : 
                                 80                 :              1 :   free(ptr);
                                 81                 :              1 :   exit (0);
                                 82                 :                : }
        

Generated by: LCOV version 2.4-beta