Changeset 40:ec5dde8a6ff6 in xplra for test/basicctest.c
- Timestamp:
- 02/14/13 18:21:47 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/basicctest.c
r36 r40 33 33 #include <stdio.h> 34 34 #include <string.h> 35 36 #ifdef _WIN32 37 #include <windows.h> 38 #else 39 #include <unistd.h> 40 #endif 41 42 //------------------------------------------------------------------------------ 43 44 #ifdef _WIN32 45 void _sleep(int ms) 46 { 47 Sleep(ms); 48 } 49 #else 50 void _sleep(int ms) 51 { 52 usleep(ms*1000); 53 } 54 #endif 55 35 56 36 57 //------------------------------------------------------------------------------ … … 74 95 } 75 96 97 printf("Showing a message...\n"); 98 if (xplra_show_message(connectionID, "[basictest] Starting tests", 5.0)<0) goto error; 99 printf("\n"); 100 76 101 printf("Querying the versions...\n"); 77 102 if (xplra_get_versions(connectionID, &xplaneVersion, … … 341 366 printf("The tail number is: '%s'\n\n", (char*)tailNum); 342 367 368 printf("Preparing for the message tests, sleeping for 5 seconds...\n"); 369 _sleep(5*1000); 370 371 printf("Showing a message for 10 seconds...\n"); 372 if (xplra_show_message(connectionID, "[basictest] this message appears for 10 seconds", 10.0)<0) { 373 goto error; 374 } 375 376 printf("Sleeping for 3 seconds...\n"); 377 _sleep(3*1000); 378 379 printf("Showing another message interrupting the previous one for 3 seconds"); 380 if (xplra_show_message(connectionID, "[basictest] but this message interrupts it, and is displayed for 3 seconds", 3.0)<0) { 381 goto error; 382 } 383 384 printf("Sleeping for 5 seconds...\n"); 385 _sleep(5*1000); 386 if (xplra_show_message(connectionID, "[basictest] and the tests come to an end!", 5.0)<0) { 387 goto error; 388 } 389 343 390 goto cleanup; 344 391 error:
Note:
See TracChangeset
for help on using the changeset viewer.