#include "puzzle.h" #include #include Puzzle *GetTestPuzzle() { Puzzle *outp = malloc(sizeof(Puzzle)); if (outp == NULL) return NULL; outp->Name = strdup("Test puzzle"); outp->Description = strdup("In this puzzle you will have to return the input string\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\nThis is a line that should be somewhere down"); return outp; } void FreePuzzle(Puzzle *self) { free(self->Name); free(self->Description); free(self->PrivateTests); free(self->PublicTests); free(self); }