Skip to content

Entrega ejercicio 1,2,3 Ciccarelli#13

Open
glciccarelli wants to merge 8 commits intogbobr:masterfrom
glciccarelli:master
Open

Entrega ejercicio 1,2,3 Ciccarelli#13
glciccarelli wants to merge 8 commits intogbobr:masterfrom
glciccarelli:master

Conversation

@glciccarelli
Copy link

No description provided.

printf("%s,%d,%d\n",indice[i]->nombre,indice[i]->id,indice[i]->puntaje);
}

printf("\n#SALIDA#\n");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No debe quitar este printf, caso contrario el test automatizado no sabe a partir de donde comienza la salida del programa.


jugadores[i].id=i;
}
for(i=0; i< MAX_PLAYERS; i++){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisar el ordienamiento ya que la salida no coincide con lo que se espera.

Salida obtenida:

Berserker,0,97
Berserker,0,97
r4t0,2,71
r4t0,2,71
r4t0,2,71


printf("\n#SALIDA#\n");

//A PARTIR DE ESTE PUNTO LA SALIDA DEL PROGRAMA DEBE COINCIDIR EXACTAMENTE CON EL LOTE DE PRUEBA
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La salida debe coincidir EXACTAMENTE con el lote de pruebas. Faltan los títulos, y no coincide el orden de los campos

Salida esperada:

ID, Nombre, Puntaje
3, Juan, 150
1, Nevermore, 100
0, Berserker, 97
2, r4t0, 71
Salida obtenida:
Berserker,0,97
Berserker,0,97
r4t0,2,71
r4t0,2,71
r4t0,2,71


while(!band){
band=1;
for(int i=0;i<iCantidad;i++){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No le gustó al compilador la declaración del int i ahi.
No es compatible con el standard ANSI C90

Ver salida de la compilación aqui: https://jenkins-gbobr-ci.7e14.starter-us-west-2.openshiftapps.com/job/punteros2/37/console

@gbobr
Copy link
Owner

gbobr commented Oct 25, 2018

Falla el test automatizado del ejercicio 1

Salida:

./ejercicio1 < test/input.txt | awk 'BEGIN{f=0} {if(f) print; if($1=="#SALIDA#") f=1;}' > output.txt
diff test/expected.txt output.txt
0a1
> 0
4d4
< 8

Es decir que está agregando un 0 al principio y pierde el último valor.

Por ejemplo, si ingreso los numeros:
1,3,9,4
La salida está siendo
0,1,3,4
Cuando debería ser
1,3,4,9

Para más detalles vease: https://jenkins-gbobr-ci.7e14.starter-us-west-2.openshiftapps.com/job/punteros2/41/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants