Author: rfm
Date: Tue Jul 12 19:37:32 2016
New Revision: 39988

URL: http://svn.gna.org/viewcvs/gnustep?rev=39988&view=rev
Log:
run loops for half a second

Modified:
    libs/base/trunk/Tests/base/NSStream/memandfile_2.m

Modified: libs/base/trunk/Tests/base/NSStream/memandfile_2.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Tests/base/NSStream/memandfile_2.m?rev=39988&r1=39987&r2=39988&view=diff
==============================================================================
--- libs/base/trunk/Tests/base/NSStream/memandfile_2.m  (original)
+++ libs/base/trunk/Tests/base/NSStream/memandfile_2.m  Tue Jul 12 19:37:32 2016
@@ -52,7 +52,8 @@
       }
     default: 
       {
-        NSAssert1(1, @"Error! code is %d", [[theStream streamError] code]);
+        NSAssert1(1, @"Error! code is %ld",
+          (long int)[[theStream streamError] code]);
         break;
       }  
     }
@@ -100,7 +101,8 @@
       }
     default: 
       {
-        NSAssert1(1, @"Error! code is %d", [[theStream streamError] code]);
+        NSAssert1(1, @"Error! code is %ld",
+          (long int)[[theStream streamError] code]);
         break;
       }  
     }
@@ -111,7 +113,8 @@
 int main()
 {
   NSAutoreleasePool   *arp = [NSAutoreleasePool new];
-  NSRunLoop *rl = [NSRunLoop currentRunLoop];
+  NSRunLoop     *rl = [NSRunLoop currentRunLoop];
+  NSData        *answer;
 
   // first test, file to memory copy
   NSString *path = @"memandfile.m";
@@ -125,9 +128,9 @@
   [input open];
   [output open];
   defaultOutput = output;
-  [rl run];
+  [rl runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.5]];
 
-  NSData *answer = [output propertyForKey: 
NSStreamDataWrittenToMemoryStreamKey];
+  answer = [output propertyForKey: NSStreamDataWrittenToMemoryStreamKey];
   PASS([goldData isEqualToData: answer], "file to memory copy ok");
 
   // second test, memory to file copy
@@ -141,7 +144,7 @@
   [input2 open];
   [output2 open];
   defaultInput = input2;
-  [rl run];
+  [rl runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.5]];
 
   NSData *answer2 = [NSData dataWithContentsOfFile: pathO];
   PASS([goldData isEqualToData: answer2], "memory to file copy ok");


_______________________________________________
Gnustep-cvs mailing list
Gnustep-cvs@gna.org
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to