diff options
author | Max Horn | 2006-03-29 10:25:48 +0000 |
---|---|---|
committer | Max Horn | 2006-03-29 10:25:48 +0000 |
commit | 3820593bb8dfdca4e2e17c70b278065b7f7894d9 (patch) | |
tree | df3e8bebda3abcd99d0882dc9e8c6410f86850fb /test/cxxtest/sample/file_printer.tpl | |
parent | 9c94670e22cb68e32fd38c0d2b009539e35d4a71 (diff) | |
download | scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.gz scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.bz2 scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.zip |
bringing cxxtest-3.10.1 to ScummVM's main branch
svn-id: r21488
Diffstat (limited to 'test/cxxtest/sample/file_printer.tpl')
-rw-r--r-- | test/cxxtest/sample/file_printer.tpl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/cxxtest/sample/file_printer.tpl b/test/cxxtest/sample/file_printer.tpl new file mode 100644 index 0000000000..a9627d6d0d --- /dev/null +++ b/test/cxxtest/sample/file_printer.tpl @@ -0,0 +1,22 @@ +// -*- C++ -*- +// This is a sample of a custom test runner +// using CxxTest template files. +// This prints the output to a file given on the command line. +// + +#include <cxxtest/StdioPrinter.h> +#include <stdio.h> + +int main( int argc, char *argv[] ) +{ + if ( argc != 2 ) { + fprintf( stderr, "Usage: %s <output file name>\n", argv[0] ); + return -1; + } + + return CxxTest::StdioPrinter( fopen( argv[1], "w" ) ).run(); +} + +// The CxxTest "world" +<CxxTest world> + |