def test_RenderBuildStep_process(): step = RenderBuildStep() parsetree = [ PepFunctionCall( PepSymbol( "print" ), ( PepString( "Hello, world!" ), ) ) ] cpp = step.process( parsetree ) assert_equal( cpp, """#include <stdio.h> int main( int argc, char* argv[] ) { printf( "Hello, world!\\n" ); return 0; } """ )
def test_RenderBuildStep_write_to_file(): step = RenderBuildStep() out_fl = StringIO() step.write_to_file( "foobar", out_fl ) assert_equal( out_fl.getvalue(), "foobar" )