From 0608b15caa35831a16aa7e5fd1490df24dd01784 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Wed, 2 Jun 2010 17:36:03 +0000 Subject: [Author: dmaclach] Cleans up builds of GTM on Snow Leopard with gcc 4.2. Cleans up iPhone configs Adds libgcov for Snow Leopard Fixes up some small bugs. R=thomasvl DELTA=2028 (972 added, 990 deleted, 66 changed) --- Foundation/GTMScriptRunnerTest.m | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'Foundation/GTMScriptRunnerTest.m') diff --git a/Foundation/GTMScriptRunnerTest.m b/Foundation/GTMScriptRunnerTest.m index 1da7f78..f13fe6c 100644 --- a/Foundation/GTMScriptRunnerTest.m +++ b/Foundation/GTMScriptRunnerTest.m @@ -382,34 +382,34 @@ STAssertNotNil(sr, @"Script runner must not be nil"); NSString *output = nil, *err = nil, *cmd = nil; - NSString *generator_format_str = - @"import sys\n" - @"block = '.' * 512\n" - @"for x in [%@]:\n" - @" to_where = x[0]\n" - @" how_many = int(x[1:])\n" - @" for x in xrange(0, how_many):\n" - @" if to_where in [ 'o', 'b' ]:\n" - @" sys.stdout.write(block)\n" - @" if to_where in [ 'e', 'b' ]:\n" - @" sys.stderr.write(block)\n"; + #define GENERATOR_FORMAT_STR \ + @"import sys\n" \ + @"block = '.' * 512\n" \ + @"for x in [%@]:\n" \ + @" to_where = x[0]\n" \ + @" how_many = int(x[1:])\n" \ + @" for x in xrange(0, how_many):\n" \ + @" if to_where in [ 'o', 'b' ]:\n" \ + @" sys.stdout.write(block)\n" \ + @" if to_where in [ 'e', 'b' ]:\n" \ + @" sys.stderr.write(block)\n" // Make sure we get both blocks - cmd = [NSString stringWithFormat:generator_format_str, @"'b1'"]; + cmd = [NSString stringWithFormat:GENERATOR_FORMAT_STR, @"'b1'"]; STAssertNotNil(cmd, nil); output = [sr run:cmd standardError:&err]; STAssertEquals([output length], (NSUInteger)512, nil); STAssertEquals([err length], (NSUInteger)512, nil); // Test a large amount of data on only one connections at a time. - cmd = [NSString stringWithFormat:generator_format_str, @"'b1', 'o200'"]; + cmd = [NSString stringWithFormat:GENERATOR_FORMAT_STR, @"'b1', 'o200'"]; STAssertNotNil(cmd, nil); output = [sr run:cmd standardError:&err]; STAssertEquals([output length], (NSUInteger)(512 + 512*200), nil); STAssertEquals([err length], (NSUInteger)512, nil); #if 0 // Not fixed yet - cmd = [NSString stringWithFormat:generator_format_str, @"'b1', 'e200'"]; + cmd = [NSString stringWithFormat:GENERATOR_FORMAT_STR, @"'b1', 'e200'"]; STAssertNotNil(cmd, nil); output = [sr run:cmd standardError:&err]; STAssertEquals([output length], (NSUInteger)512, nil); @@ -419,7 +419,7 @@ // Now send a large amount down both to make sure we spool it all in. #if 0 // Not fixed yet - cmd = [NSString stringWithFormat:generator_format_str, @"'b200'"]; + cmd = [NSString stringWithFormat:GENERATOR_FORMAT_STR, @"'b200'"]; STAssertNotNil(cmd, nil); output = [sr run:cmd standardError:&err]; STAssertEquals([output length], (NSUInteger)(512*200), nil); -- cgit v1.2.3