You could have optionally a file like you have. That's perfect for beginners and how my university actually starts some homeworks. For other people it might be good to use output matching since you won't be able to make a unit test to handle every method of solving the problem.
Anyway I'll probably keep solving these, they are pretty fun. I'll just ignore the unit tests, it should be fine (famous last words).