Changeset 60:b87f8bb9944c in xplra for test/basictest.cc
- Timestamp:
- 04/04/13 15:56:27 (11 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 3 'hg:/home/ivaradi/xplane/hg/xplra' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/basictest.cc
r40 r60 99 99 size_t length = xplane.getByteArray("sim/aircraft/view/acf_descrip", 100 100 result, sizeof(result)/sizeof(result[0])); 101 printf("Got %zu bytes, as a string: '%s'\n\n", length, result); 101 printf("Got %lu bytes, as a string: '%s'\n\n", 102 static_cast<unsigned long>(length), result); 102 103 103 104 printf("Querying the aircraft's description as a dynamically created array...\n"); 104 105 uint8_t* result1 = xplane.getByteArray("sim/aircraft/view/acf_descrip", length); 105 printf("Got %zu bytes, as a string: '%s'\n\n", length, result1); 106 printf("Got %lu bytes, as a string: '%s'\n\n", 107 static_cast<unsigned long>(length), result1); 106 108 107 109 printf("Querying the aircraft's description as a string, with an offset of 3...\n"); … … 113 115 length = xplane.getIntArray("sim/aircraft/prop/acf_en_type", 114 116 result3, sizeof(result3)/sizeof(result3[0])); 115 printf("Got % zu values:", length);117 printf("Got %lu values:", static_cast<unsigned long>(length)); 116 118 for(size_t i = 0; i<length; ++i) { 117 119 if (i>0) printf(","); … … 123 125 length = 0; 124 126 int32_t* result4 = xplane.getIntArray("sim/aircraft/prop/acf_en_type", length); 125 printf("Got % zu values:", length);127 printf("Got %lu values:", static_cast<unsigned long>(length)); 126 128 for(size_t i = 0; i<length; ++i) { 127 129 if (i>0) printf(","); … … 134 136 length = xplane.getFloatArray("sim/aircraft/prop/acf_prop_dir", 135 137 result5, sizeof(result5)/sizeof(result5[0])); 136 printf("Got % zu values:", length);138 printf("Got %lu values:", static_cast<unsigned long>(length)); 137 139 for(size_t i = 0; i<length; ++i) { 138 140 if (i>0) printf(","); … … 144 146 length = 0; 145 147 float* result6 = xplane.getFloatArray("sim/aircraft/prop/acf_prop_dir", length); 146 printf("Got % zu values:", length);148 printf("Got %lu values:", static_cast<unsigned long>(length)); 147 149 for(size_t i = 0; i<length; ++i) { 148 150 if (i>0) printf(",");
Note:
See TracChangeset
for help on using the changeset viewer.