[Positionner] tests: improve Mobile tests

master
Matteo Cypriani 7 years ago
parent a77ee05239
commit 16d4422a2b

@ -32,6 +32,14 @@ public:
Mobile mobile3("192.168.0.1", "AA:BB:CC:DD:EE:FF", 5, 32) ;
Mobile mobile4(mobile3) ;
TS_ASSERT_EQUALS(mobile3, mobile4) ;
// Now add some results
Result r;
ResultList rl;
rl.add(r);
mobile4.set_last_results(rl);
Mobile mobile5(mobile4);
TS_ASSERT_EQUALS(mobile4, mobile5);
}
@ -70,6 +78,25 @@ public:
// =
mobile2 = mobile3 ;
TS_ASSERT_EQUALS(mobile2, mobile3) ;
/* Now with some results */
Result r;
ResultList rl;
rl.add(r);
// !=
mobile2.set_last_results(rl);
TS_ASSERT_DIFFERS(mobile2, mobile3);
// ==
mobile3.set_last_results(rl);
TS_ASSERT_EQUALS(mobile2, mobile3);
// =
Mobile mobile4(mobile1);
TS_ASSERT_DIFFERS(mobile3, mobile4);
mobile4 = mobile3;
TS_ASSERT_EQUALS(mobile3, mobile4);
}
} ;

Loading…
Cancel
Save