Changeset 112:58892a32a039 in xplra


Ignore:
Timestamp:
12/23/22 09:10:52 (16 months ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 3 'hg:/home/ivaradi/xplane/hg/xplra' '/'>, 'public')
Message:

The test programs can be parameterized to connect over TCP

Location:
test
Files:
4 added
9 edited

Legend:

Unmodified
Added
Removed
  • test/Makefile.am

    r101 r112  
    1313endif
    1414
    15 basictest_SOURCES=basictest.cc
     15basictest_SOURCES=basictest.cc common.cc
    1616
    17 basicctest_SOURCES=basicctest.c
     17basicctest_SOURCES=basicctest.c ccommon.c
    1818if TARGET_API_WIN32
    1919basicctest_LDFLAGS=-lstdc++
    2020endif
    2121
    22 multigettest_SOURCES=multigettest.cc
     22multigettest_SOURCES=multigettest.cc common.cc
    2323
    24 multigetctest_SOURCES=multigetctest.c
     24multigetctest_SOURCES=multigetctest.c ccommon.c
    2525if TARGET_API_WIN32
    2626multigetctest_LDFLAGS=-lstdc++
    2727endif
    2828
    29 multisettest_SOURCES=multisettest.cc
     29multisettest_SOURCES=multisettest.cc common.cc
    3030
    31 multisetctest_SOURCES=multisetctest.c
     31multisetctest_SOURCES=multisetctest.c ccommon.c
    3232if TARGET_API_WIN32
    3333multisetctest_LDFLAGS=-lstdc++
    3434endif
    3535
    36 hotkeytest_SOURCES=hotkeytest.cc
     36hotkeytest_SOURCES=hotkeytest.cc common.cc
    3737
    38 hotkeyctest_SOURCES=hotkeyctest.c
     38hotkeyctest_SOURCES=hotkeyctest.c ccommon.c
    3939if TARGET_API_WIN32
    4040hotkeyctest_LDFLAGS=-lstdc++
     
    4444
    4545EXTRA_DIST=\
     46        common.h                \
     47        common.cc               \
     48        ccommon.h               \
     49        ccommon.cc              \
    4650        runpy.sh                \
    4751        basictest.py            \
  • test/basicctest.c

    r89 r112  
    3030
    3131#include <hu/varadiistvan/xplra/xplra.h>
     32
     33#include "ccommon.h"
    3234
    3335#include <stdio.h>
     
    5759//------------------------------------------------------------------------------
    5860
    59 int main()
     61int main(int argc, char* argv[])
    6062{
    6163    static const char* tailNum1 = "VAI";
     
    8688
    8789    printf("Connection to X-Plane...\n");
    88     int connectionID = xplra_connect();
     90    int connectionID = connect_xplane(argc, argv);
    8991
    9092    if (connectionID>=0) {
  • test/basictest.cc

    r89 r112  
    2929//------------------------------------------------------------------------------
    3030
     31#include "common.h"
     32
    3133#include <hu/varadiistvan/xplra/XPlane.h>
    3234
     
    4850//------------------------------------------------------------------------------
    4951
    50 int main()
     52int main(int argc, char* argv[])
    5153{
    5254    try {
     
    5456
    5557        printf("Connecting to X-Plane...\n");
    56         xplane.connect();
     58        connectXPlane(xplane, argc, argv);
    5759        printf("Connected to X-Plane.\n\n");
    5860
  • test/hotkeyctest.c

    r55 r112  
    3131#include <hu/varadiistvan/xplra/xplra.h>
    3232
     33#include "ccommon.h"
     34
    3335#include <stdio.h>
    3436#include <string.h>
     
    5759//------------------------------------------------------------------------------
    5860
    59 int main()
     61int main(int argc, char* argv[])
    6062{
    6163    int retval = 0;
     
    6567
    6668    printf("Connecting to X-Plane...\n");
    67     int connectionID = xplra_connect();
     69    int connectionID = connect_xplane(argc, argv);
    6870
    6971    if (connectionID>=0) {
  • test/hotkeytest.cc

    r54 r112  
    3333#include <hu/varadiistvan/scpl/Thread.h>
    3434
     35#include "common.h"
     36
    3537#include <cstdio>
    3638#include <cstring>
     
    4850//------------------------------------------------------------------------------
    4951
    50 int main()
     52int main(int argc, char* argv[])
    5153{
    5254    try {
     
    5456
    5557        printf("Connecting to X-Plane...\n");
    56         xplane.connect();
     58        connectXPlane(xplane, argc, argv);
    5759        printf("Connected to X-Plane.\n\n");
    5860
  • test/multigetctest.c

    r41 r112  
    3030
    3131#include <hu/varadiistvan/xplra/xplra.h>
     32
     33#include "ccommon.h"
    3234
    3335#include <stdlib.h>
     
    141143
    142144    printf("Connecting to X-Plane...\n");
    143     connectionID = xplra_connect();
     145    connectionID = connect_xplane(argc, argv);
    144146    if (connectionID>=0) {
    145147        printf("Connected to X-Plane.\n\n");
  • test/multigettest.cc

    r41 r112  
    3434#include <hu/varadiistvan/scpl/Thread.h>
    3535
     36#include "common.h"
     37
    3638#include <cstdio>
    3739#include <cstring>
     
    6163
    6264        printf("Connecting to X-Plane...\n");
    63         xplane.connect();
     65        connectXPlane(xplane, argc, argv);
    6466        printf("Connected to X-Plane.\n\n");
    6567
  • test/multisetctest.c

    r30 r112  
    3030
    3131#include <hu/varadiistvan/xplra/xplra.h>
     32
     33#include "ccommon.h"
    3234
    3335#include <stdlib.h>
     
    6668
    6769    printf("Connecting to X-Plane...\n");
    68     connectionID = xplra_connect();
     70    connectionID = connect_xplane(argc, argv);
    6971    if (connectionID>=0) {
    7072        printf("Connected to X-Plane.\n\n");
  • test/multisettest.cc

    r26 r112  
    3434#include <hu/varadiistvan/scpl/Thread.h>
    3535
     36#include "common.h"
     37
    3638#include <cstdio>
    3739#include <cstring>
     
    6062
    6163        printf("Connecting to X-Plane...\n");
    62         xplane.connect();
     64        connectXPlane(xplane, argc, argv);
    6365        printf("Connected to X-Plane.\n\n");
    6466
Note: See TracChangeset for help on using the changeset viewer.