This is LaTeX Samurai's test.cpp

This includes all of LaTeX Samurai's test code condensed into a single C++ file.