generated from UF-IRI/qt_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
37 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,18 +12,15 @@ Reservas clases(sClientes cliente, Asistencia* asistencia, Clases nombreClase); | |
{21,6,{2,168999097}} | ||
}; | ||
hay un par de errores con el testing del resize de asistencias pero no llegamos a resolverlo | ||
*/ | ||
const Inscripcion DefaultInscripcion[3] = { | ||
{5,168999097}, | ||
{8,168999097}, | ||
{2,168999097} | ||
}; | ||
|
||
};*/ | ||
/* | ||
TEST_CASE("Inscripcion multiple") | ||
{ | ||
Asistencia *aux= new Asistencia; //tamaño | ||
aux=nullptr; | ||
Asistencia *aux= new Asistencia[1]; //tamaño | ||
sClientes cliente; | ||
u_int num=1; | ||
u_int cantClientes; | ||
|
@@ -39,21 +36,21 @@ TEST_CASE("Inscripcion multiple") | |
cliente.mail={"[email protected]"}; | ||
cliente.nombre={"Martina"}; | ||
cliente.telefono={"123-456-786"}; | ||
cliente.idCliente=1; | ||
aux->cantInscriptos=1; | ||
aux->CursosInscriptos->idCurso=3; | ||
aux->CursosInscriptos->fechaInscripcion=16112023; | ||
aux->idCliente=1; | ||
curso->horarioClase=5; | ||
curso->idClase=3; | ||
curso->nombreClase={"boxeo"}; | ||
clases(cliente, aux, curso, cantClientes, curso->nombreClase, curso->horarioClase);//revisar | ||
clases(cliente, aux, curso, cantClientes, curso->nombreClase, curso->horarioClase); | ||
SECTION("Verificacion de inscripcion"){ | ||
Inscripto result = estaInscriptoClases(aux, curso, curso->nombreClase, curso->horarioClase); | ||
REQUIRE(result == 1); | ||
} | ||
SECTION("Superposicion horaria"){ | ||
superposicion superp = superposicionHorarios(aux, curso, cliente.idCliente, cantClientes,curso->nombreClase, curso->horarioClase); | ||
REQUIRE(superp == 1); | ||
|
@@ -88,7 +85,7 @@ TEST_CASE("Resize") | |
CHECK(antigua != inscripcion); | ||
} | ||
/*SECTION("Resize asistencia"){ | ||
SECTION("Resize asistencia"){ | ||
Asistencia* asistencia = new Asistencia[2]; | ||
Inscripcion* inscripcion = new Inscripcion[2]; | ||
|
@@ -102,28 +99,26 @@ TEST_CASE("Resize") | |
u_int cant; | ||
cant=num; | ||
resizeAsistencia(asistencia, cant , 2 + 3); | ||
asistencia[2] = {"23","1",inscripcion[3]}; | ||
asistencia[2] = {"28","2",inscripcion[3]}; | ||
asistencia[2] = {23,1,inscripcion}; | ||
asistencia[2] = {28,2,inscripcion}; | ||
CHECK(vieja != asistencia); | ||
}*/ | ||
} | ||
} | ||
}*/ | ||
TEST_CASE("Verificar espacio") | ||
{ | ||
SECTION("Asistencia"){ | ||
int cantmax=40; | ||
u_int num=6; | ||
u_int cant; | ||
cant=num; | ||
u_int cantmax=40; | ||
u_int cant=6; | ||
REQUIRE(!espacioAsistencias(cantmax,cant)); | ||
} | ||
|
||
SECTION("Inscricion"){ | ||
Asistencia* asistencia; | ||
int cantmax=40; | ||
u_int num=2; | ||
u_int cant; | ||
cant=num; | ||
Inscripcion* inscripcion = new Inscripcion[1]; | ||
inscripcion[1]={5,168999097}; | ||
Asistencia asistencia[1]={23, 1, inscripcion}; | ||
u_int cantmax=40; | ||
asistencia->cantInscriptos=6; | ||
REQUIRE(!espacioInscripciones(asistencia,cantmax)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,20 +17,18 @@ const sClientes DefaultCliente[3] = { | |
{"Felipe", "Gonzalez", "44312783", "[email protected]", "987-654-3210", {15, 11, 1992}, 0, 2}, | ||
{"Laura", "Fernandez", "32145638", "[email protected]", "316-424-5885", {3, 9, 1995}, 0, 3} | ||
}; | ||
|
||
/* | ||
TEST_CASE("Agregar cliente") | ||
{ | ||
sClientes* cliente= new sClientes; | ||
cliente=nullptr; | ||
u_int cant=NULL; | ||
int cantMaxima=6; | ||
u_int cant=0; | ||
u_int cantMaxima=6; | ||
SECTION("Agregando dos clientes") | ||
{ | ||
eAgregar resul; | ||
eAgregar resul2; | ||
resul= agregarCliente(cliente,{"Valentina","Perez","46534213","valenPrez@gmial", "115-233-5643",{12,3,2006},0,1}, cant, cantMaxima); //agregar cliente | ||
resul2= agregarCliente(cliente,{"Marcos","Aguilar","45025423","Aguilar115@gmial", "120-465-3289",{6,7,1996},123,2}, cant, cantMaxima); | ||
eAgregar resul= agregarCliente(cliente,{"Valentina","Perez","46534213","valenPrez@gmial", "115-233-5643",{12,3,2006},0,1}, cant, cantMaxima); //agregar cliente | ||
eAgregar resul2= agregarCliente(cliente,{"Marcos","Aguilar","45025423","Aguilar115@gmial", "120-465-3289",{6,7,1996},123,2}, cant, cantMaxima); | ||
if(resul==1 && resul2==1) | ||
cant=2; | ||
REQUIRE(resul==1); //ambos se agregaron de manera correcta | ||
|
@@ -55,7 +53,7 @@ TEST_CASE("Buscar cliente") | |
SECTION("Buscando el cliente por DNI") | ||
{ | ||
int resul = buscarCliente(cliente, "46534213", cant); | ||
REQUIRE(resul == 0); | ||
REQUIRE(resul == 1); | ||
} | ||
} | ||
|
@@ -124,26 +122,26 @@ TEST_CASE("Resize cliente") | |
u_int cant; | ||
cant=num; | ||
resizeClientes(clientes, cant , 3 + 2); | ||
clientes[3] = {"Valentina","Perez","46534213","valenPrez@gmial", "115-233-5643",{12,3,2006},0,1}; | ||
clientes[3] = {"Marcos","Aguilar","45025423","Aguilar115@gmial", "120-465-3289",{6,7,1996},123,2}; | ||
clientes[3] = {"Valentina","Perez","46534213","valenPrez@gmial", "115-233-5643",{12,3,2006},0,4}; | ||
clientes[4] = {"Marcos","Aguilar","45025423","Aguilar115@gmial", "120-465-3289",{6,7,1996},123,5}; | ||
CHECK(ViejaDireccion != clientes); | ||
} | ||
} | ||
}*/ | ||
|
||
TEST_CASE("Estado de la cuota") | ||
{ | ||
sClientes* cliente = new sClientes[3]; | ||
//eEstado Cuota(sClientes* cliente, str dni, int cant) | ||
str dni1={"46534213"}; | ||
str dni1={"46203718"}; | ||
str dni2={"45025423"}; | ||
u_int num=2; | ||
u_int cant; | ||
cant=num; | ||
SECTION("Comprobando estado de dos clientes") | ||
{ | ||
eEstado resul=Cuota(cliente, dni1, cant); | ||
REQUIRE(resul==eEstado::AlDia); | ||
REQUIRE(resul==eEstado::Afavor); | ||
eEstado resul2=Cuota(cliente, dni2, cant); | ||
REQUIRE(resul2==eEstado::Afavor); | ||
} | ||
|