File: test-lib.c

package info (click to toggle)
libahp-gt 1.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 444 kB
  • sloc: ansic: 2,459; sh: 15; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 482 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <ahp/ahp_gt.h>
#include <stdint.h>


int main(int argc, char** argv)
{
 int rc=0;
 int version=0;
 int isConnected;

 version=ahp_gt_get_version();

 if (version==0) {
   fprintf(stderr,"D: initial version may not be zero");
   rc=1;
 }
 isConnected=ahp_gt_is_connected();
 printf("D: isConnected: %i\n",isConnected);
 /* we can not be connected, so this is an error */
 if (isConnected!=0) rc=1;

 if (rc==0) {
   printf("D: PASS\n");
 }

 return rc;
}