LCOV - code coverage report
Current view: top level - src/interfaces/ecpg/test/preproc - init.pgc (source / functions) Coverage Total Hit
Test: Code coverage Lines: 0.0 % 48 0
Test Date: 2026-01-26 10:56:24 Functions: 0.0 % 7 0
Legend: Lines:     hit not hit

            Line data    Source code
       1              : exec sql include sqlca;
       2              : 
       3              : enum e { ENUM0, ENUM1 };
       4              : struct sa { int member; };
       5              : 
       6            0 : static int fa(void)
       7              : {
       8            0 :         printf("in fa\n");
       9            0 :         return 2;
      10              : }
      11              : 
      12              : static int
      13            0 : fb(int x)
      14              : {
      15            0 :         printf("in fb (%d)\n", x);
      16            0 :         return x;
      17              : }
      18              : 
      19              : static int
      20            0 : fc(const char *x)
      21              : {
      22            0 :         printf("in fc (%s)\n", x);
      23            0 :         return *x;
      24              : }
      25              : 
      26            0 : static int fd(const char *x,int i)
      27              : {
      28            0 :         printf("in fd (%s, %d)\n", x, i);
      29            0 :         return (*x)*i;
      30              : }
      31              : 
      32            0 : static int fe(enum e x)
      33              : {
      34            0 :         printf("in fe (%d)\n", (int) x);
      35            0 :         return (int)x;
      36              : }
      37              : 
      38            0 : static void sqlnotice(const char *notice, short trans)
      39              : {
      40            0 :         if (!notice)
      41            0 :                 notice = "-empty-";
      42            0 :         printf("in sqlnotice (%s, %d)\n", notice, trans);
      43            0 : }
      44              : 
      45              : exec sql define NONO 0;
      46              : 
      47              : #define YES 1
      48              : 
      49              : #ifdef _cplusplus
      50              : namespace N
      51              : {
      52              :         static const int i=2;
      53              : };
      54              : #endif
      55              : 
      56            0 : int main(void)
      57              : {
      58            0 :         struct sa x = { 14 },*y = &x;
      59              :         exec sql begin declare section;
      60            0 :                 int a=(int)2;
      61            0 :                 int b=2+2;
      62            0 :                 int b2=(14*7);
      63            0 :                 int d=x.member;
      64            0 :                 int g=fb(2);
      65            0 :                 int i=3^1;
      66            0 :                 int j=1?1:2;
      67              : 
      68            0 :                 int e=y->member;
      69            0 :                 int c=10>>2;
      70            0 :                 bool h=2||1;
      71            0 :                 long iay /* = 1L */ ;
      72              :         exec sql end declare section;
      73              : 
      74            0 :         int f=fa();
      75              : 
      76              : #ifdef _cplusplus
      77              :         exec sql begin declare section;
      78              :         int k=N::i; /* compile error */
      79              :         exec sql end declare section;
      80              : #endif
      81              : 
      82              :         ECPGdebug(1, stderr);
      83              : 
      84              :         printf("%d %d %d %d %d %d %d %d %d %d %d\n", a, b, b2, c, d, e, f, g, h, i, j);
      85              :         iay = 0;
      86              :         printf("%ld\n", iay);
      87            0 :         exec sql whenever sqlerror do fa();
      88            0 :         exec sql select now();
      89            0 :         exec sql whenever sqlerror do fb(20);
      90            0 :         exec sql select now();
      91            0 :         exec sql whenever sqlerror do fc("50");
      92            0 :         exec sql select now();
      93            0 :         exec sql whenever sqlerror do fd("50",1);
      94            0 :         exec sql select now();
      95            0 :         exec sql whenever sqlerror do fe(ENUM0);
      96            0 :         exec sql select now();
      97            0 :         exec sql whenever sqlerror do sqlnotice(NULL, NONO);
      98            0 :         exec sql select now();
      99            0 :         return 0;
     100            0 : }
        

Generated by: LCOV version 2.3.2-1