io_B32_read_tests.c (422B)
1 #include "../test.h" 2 3 void run(void) { 4 char str[STRLENMAX], *aux; 5 cube_t cube; 6 7 aux = str; 8 while (fgets(aux, STRLENMAX, stdin) != NULL) 9 while (*aux != '\n') 10 aux++; 11 12 cube = readcube("B32", str); 13 14 if (iserror(cube)) { 15 printf("Error reading cube\n"); 16 } else if (!issolvable(cube)) { 17 printf("Cube is not solvable\n"); 18 } else { 19 writecube("H48", cube, NISSY_SIZE_H48, str); 20 printf("%s\n", str); 21 } 22 }