Changeset 41:a3f71b4eaca1 in xplra for test/multigettest.cc
- Timestamp:
- 02/14/13 18:32:21 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/multigettest.cc
r29 r41 42 42 using hu::varadiistvan::xplra::MultiGetter; 43 43 using hu::varadiistvan::xplra::Exception; 44 using hu::varadiistvan::xplra::ProtocolException; 44 45 45 46 using hu::varadiistvan::scpl::Thread; … … 62 63 xplane.connect(); 63 64 printf("Connected to X-Plane.\n\n"); 65 66 MultiGetter& wrongGetter = xplane.createMultiGetter(); 67 wrongGetter.addInt("sim/time/local_date_days"); 68 wrongGetter.addInt("sim/time/paused"); 69 wrongGetter.addInt("sim/time/hello_te_lo"); 70 wrongGetter.addFloat("sim/time/zulu_time_sec"); 71 wrongGetter.addInt("sim/operation/prefs/replay_mode"); 72 73 printf("Executing a multi-dataref getter with an invalid dataref...\n"); 74 try { 75 wrongGetter.execute(); 76 printf(">>>>>>>>>>>>>>>>>>>>> Succeeded, but it should not have!!!!\n\n"); 77 } catch(const ProtocolException& e) { 78 printf("Caught protocol exception: %s\n\n", e.what()); 79 } 80 81 printf("Executing a registered multi-dataref getter with an invalid dataref...\n"); 82 wrongGetter.registerInXPlane(); 83 try { 84 wrongGetter.execute(); 85 printf(">>>>>>>>>>>>>>>>>>>>> Succeeded, but it should not have!!!!\n\n"); 86 } catch(const ProtocolException& e) { 87 printf("Caught protocol exception: %s\n\n", e.what()); 88 } 64 89 65 90 MultiGetter& getter = xplane.createMultiGetter();
Note:
See TracChangeset
for help on using the changeset viewer.