void test_pos_valida() { Campus c =randsinobs(); Campus d =c; bool proas= (c==d); Posicion p; p.x=rand()%(c.ancho())+(c.ancho())+1; p.y=rand()%(c.alto())+(c.alto())+1; proas=c.posValida(p); ASSERT(!proas); p.x=rand()%(c.ancho()); p.y=rand()%(c.alto()); proas=c.posValida(p); ASSERT(proas); }
void test_igualdad() { Campus c =randsinobs(); Campus d =c; bool proas= (c==d); ASSERT(proas); Posicion p; p.x=rand()%(c.ancho()); p.y=rand()%(c.alto()); c.agregarObs(p); proas= (c==d); ASSERT(!proas); d.agregarObs(p); proas= (c==d); ASSERT(proas); }