shivawu/topcoder-greed — pull request #67 by vexorian (2013-11-15 19:55:25+00:00)
Title: "Dual color" templates

@shivawu asked if I could add these templates to greed.

So there we go. I called them "dual color".

Dual because they use two files. The tester.cpp/py files do all the testing job, and in fact is always the same file, but for convenience they are made into a template so that people can generate them in the folder if they want/need to.

The test templates replace the default test templates in greed. They hold the source to send to TopCoder, also the test cases (in convenient bracket format) and the things needed to call the tester file.

The tester uses colors to decorate its output. These colors use ANSI-color codes so it is required to run the program in a terminal that supports them. I think that most terminals in sane OS like Linux and OS/X.

The test case format allows cases with unknown results (still can evaluate for TimeOut/seg fault) and also to disable tests by modifying a small function.