LCOV - code coverage report
Current view: top level - src/ctlib/unittests - t0005.c (source / functions) Hit Total Coverage
Test: FreeTDS coverage Lines: 6 6 100.0 %
Date: 2024-04-18 20:40:06 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /* try login and logout multiple times in a row */
       2             : 
       3             : #include <config.h>
       4             : 
       5             : #include <stdio.h>
       6             : #include <ctpublic.h>
       7             : #include "common.h"
       8             : 
       9             : int
      10           8 : main(void)
      11             : {
      12             :         CS_CONTEXT *ctx;
      13             :         CS_CONNECTION *conn;
      14             :         CS_COMMAND *cmd;
      15           8 :         int verbose = 0;
      16             :         int i;
      17             : 
      18           8 :         printf("%s: Testing login, logout\n", __FILE__);
      19             : 
      20         808 :         for (i =0; i < 100; ++i) {
      21             : 
      22             :                 if (verbose)
      23             :                         printf("Trying login\n");
      24             : 
      25         800 :                 check_call(try_ctlogin, (&ctx, &conn, &cmd, verbose));
      26             : 
      27             :                 if (verbose)
      28             :                         printf("Trying logout\n");
      29             : 
      30         800 :                 check_call(try_ctlogout, (ctx, conn, cmd, verbose));
      31             :         }
      32             : 
      33             :         if (verbose)
      34             :                 printf("Test succeeded\n");
      35             : 
      36             :         return 0;
      37             : }

Generated by: LCOV version 1.13