LCOV - differential code coverage report
Current view: top level - src/interfaces/ecpg/test/connect - test3.pgc (source / functions) Coverage Total Hit CBC
Current: Differential Code Coverage 16@8cea358b128 vs 17@8cea358b128 Lines: 100.0 % 16 16 16
Current Date: 2024-04-14 14:21:10 Functions: 100.0 % 1 1 1
Baseline: 16@8cea358b128 Branches: - 0 0
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 % 16 16 16
Function coverage date bins:
(240..) days: 100.0 % 1 1 1

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*
                                  2                 :                :  * this file just tests the several possibilities you have for a disconnect
                                  3                 :                :  */
                                  4                 :                : 
                                  5                 :                : #include <stdlib.h>
                                  6                 :                : #include <string.h>
                                  7                 :                : #include <stdlib.h>
                                  8                 :                : #include <stdio.h>
                                  9                 :                : 
                                 10                 :                : exec sql include ../regression;
                                 11                 :                : 
                                 12                 :                : int
 6465 meskes@postgresql.or       13                 :CBC           1 : main(void)
                                 14                 :                : {
                                 15                 :                : exec sql begin declare section;
                                 16                 :                :     char id[200];
                                 17                 :                :     char res[200];
                                 18                 :                : exec sql end declare section;
                                 19                 :                : 
                                 20                 :              1 :     ECPGdebug(1, stderr);
                                 21                 :                : 
                                 22                 :              1 :     strcpy(id, "first");
 2828 tgl@sss.pgh.pa.us          23                 :              1 :     exec sql connect to ecpg2_regression as :id;
 6463 meskes@postgresql.or       24                 :              1 :     exec sql connect to REGRESSDB1 as second;
                                 25                 :                : 
                                 26                 :                :     /* this selects from "second" which was opened last */
 6465                            27                 :              1 :     exec sql select current_database() into :res;
                                 28                 :                : 
                                 29                 :                :     /* will close "second" */
                                 30                 :              1 :     exec sql disconnect CURRENT;
                                 31                 :              1 :     exec sql select current_database() into :res;
                                 32                 :                : 
 6463                            33                 :              1 :     exec sql connect to REGRESSDB1 as second;
                                 34                 :                :     /* will close "second" */
 6465                            35                 :              1 :     exec sql disconnect DEFAULT;
                                 36                 :                : 
 2828 tgl@sss.pgh.pa.us          37                 :              1 :     exec sql connect to "ecpg2_regression" as second;
 6465 meskes@postgresql.or       38                 :              1 :     exec sql disconnect ALL;
                                 39                 :                : 
                                 40                 :              1 :     exec sql disconnect CURRENT;
                                 41                 :              1 :     exec sql disconnect DEFAULT;
                                 42                 :              1 :     exec sql disconnect ALL;
                                 43                 :                : 
                                 44                 :                :     /*
                                 45                 :                :      * exec sql disconnect;
                                 46                 :                :      * exec sql disconnect name;
                                 47                 :                :      *
                                 48                 :                :      *     are used in other tests
                                 49                 :                :      */
                                 50                 :                : 
 2432 peter_e@gmx.net            51                 :              1 :     return 0;
                                 52                 :                : }
        

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