Ejemplo n.º 1
0
int main(int argc, char **argv)
{
  plan_tests(11);

  Validity v;
  v.Clear();
  ok1(!v.IsValid());
  v.Update(100);
  ok1(v.IsValid());
  v.Expire(101, 5);
  ok1(v.IsValid());
  v.Expire(105, 5);
  ok1(v.IsValid());
  v.Expire(106, 5);
  ok1(!v.IsValid());

  v.Update(100);
  ok1(v.Modified(Validity(99)));
  ok1(!v.Modified(Validity(100)));
  ok1(!v.Modified(Validity(101)));
  ok1(!v.Complement(Validity(1)));

  v.Clear();
  ok1(!v.Complement(invalid()));
  ok1(v.Complement(Validity(1)));

  return exit_status();
}
Ejemplo n.º 2
0
 void Complement(const FlarmVersion &add) {
   if (available.Complement(add.available)) {
     hardware_version = add.hardware_version;
     software_version = add.software_version;
     obstacle_version = add.obstacle_version;
   }
 }
Ejemplo n.º 3
0
 void Complement(const FlarmError &add) {
   if (available.Complement(add.available)) {
     severity = add.severity;
     code = add.code;
   }
 }