Author: rfm
Date: Sat Mar  5 17:56:35 2016
New Revision: 39462

URL: http://svn.gna.org/viewcvs/gnustep?rev=39462&view=rev
Log:
correct errors in test assumptions

Modified:
    libs/base/trunk/Tests/base/NSBundle/create.m
    libs/base/trunk/Tests/base/NSBundle/resources2.m

Modified: libs/base/trunk/Tests/base/NSBundle/create.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Tests/base/NSBundle/create.m?rev=39462&r1=39461&r2=39462&view=diff
==============================================================================
--- libs/base/trunk/Tests/base/NSBundle/create.m        (original)
+++ libs/base/trunk/Tests/base/NSBundle/create.m        Sat Mar  5 17:56:35 2016
@@ -9,33 +9,32 @@
   NSString *path;
   NSBundle *bundle;
   
-  path = [[[NSFileManager defaultManager] currentDirectoryPath] 
-                                stringByAppendingPathComponent:@"Resources"];
+  path = [[[[NSFileManager defaultManager] currentDirectoryPath] 
+    stringByStandardizingPath] stringByAppendingPathComponent: @"Resources"];
   
   PASS([NSBundle mainBundle] != nil, 
-       "+mainBundle returns non-nil if the tool has no bundle");
+    "+mainBundle returns non-nil if the tool has no bundle");
   
-  bundle = [NSBundle bundleWithPath:path];
-  [bundle retain];
+  bundle = [NSBundle bundleWithPath: path];
 
   TEST_FOR_CLASS(@"NSBundle", bundle, "+bundleWithPath returns a bundle");
   
   TEST_STRING([bundle bundlePath],"a bundle has a path");
   
   PASS([path isEqual:[bundle bundlePath]] &&
-       [[bundle bundlePath] isEqual:path],
+       [[bundle bundlePath] isEqual: path],
        "bundlePath returns the correct path");
   
   TEST_FOR_CLASS(@"NSDictionary",[bundle infoDictionary],
                  "a bundle has an infoDictionary");
   
   PASS([NSBundle bundleWithPath:
-           [path stringByAppendingPathComponent:@"nonexistent"]] == nil,
+        [path stringByAppendingPathComponent: @"nonexistent"]] == nil,
        "+bundleWithPath returns nil for a non-existing path"); 
   
   {
     NSArray *arr = [NSBundle allBundles];
-    PASS(arr != nil && [arr isKindOfClass:[NSArray class]] && [arr count] != 0,
+    PASS(arr != nil && [arr isKindOfClass: [NSArray class]] && [arr count] != 
0,
          "+allBundles returns an array");
   }
   [arp release]; arp = nil;

Modified: libs/base/trunk/Tests/base/NSBundle/resources2.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Tests/base/NSBundle/resources2.m?rev=39462&r1=39461&r2=39462&view=diff
==============================================================================
--- libs/base/trunk/Tests/base/NSBundle/resources2.m    (original)
+++ libs/base/trunk/Tests/base/NSBundle/resources2.m    Sat Mar  5 17:56:35 2016
@@ -13,13 +13,13 @@
   NSBundle *bundle;
   NSArray  *arr, *carr;
   
-  path = [[[[NSFileManager defaultManager] currentDirectoryPath]
-                   stringByAppendingPathComponent:@"Resources"]
-                  stringByAppendingPathComponent: @"TestBundle.bundle"];
+  path = [[[[[NSFileManager defaultManager] currentDirectoryPath]
+    stringByStandardizingPath] stringByAppendingPathComponent: @"Resources"]
+      stringByAppendingPathComponent: @"TestBundle.bundle"];
 
   /* --- [NSBundle -pathsForResourcesOfType:inDirectory:] --- */
   bundle = [NSBundle bundleWithPath: path];
-  arr = [bundle pathsForResourcesOfType:@"txt" inDirectory: nil];
+  arr = [bundle pathsForResourcesOfType: @"txt" inDirectory: nil];
   PASS((arr && [arr count]),
     "-pathsForResourcesOfType:inDirectory: returns an array");
   localPath = [path stringByAppendingPathComponent:
@@ -32,12 +32,12 @@
     "Returned array contains localized resource");
 
   /* --- [NSBundle +pathsForResourcesOfType:inDirectory:] --- */
-  carr = [NSBundle pathsForResourcesOfType:@"txt" inDirectory: path];
+  carr = [NSBundle pathsForResourcesOfType: @"txt" inDirectory: path];
   PASS([arr isEqual: carr],
     "+pathsForResourcesOfType:inDirectory: returns same array");
 
   /* --- [NSBundle -pathsForResourcesOfType:inDirectory:forLocalization:] --- 
*/
-  arr = [bundle pathsForResourcesOfType:@"txt" inDirectory: nil
+  arr = [bundle pathsForResourcesOfType: @"txt" inDirectory: nil
     forLocalization: @"English"];
   PASS((arr && [arr count]),
     "-pathsForResourcesOfType:inDirectory:forLocalization returns an array");
@@ -51,7 +51,7 @@
     "Returned array contains localized resource");
 
   /* --- [NSBundle -pathsForResourcesOfType:inDirectory:forLocalization:] --- 
*/
-  arr = [bundle pathsForResourcesOfType:@"txt" inDirectory: nil
+  arr = [bundle pathsForResourcesOfType: @"txt" inDirectory: nil
     forLocalization: @"en"];
   PASS((arr && [arr count]),
     "-pathsForResources... returns an array for 'en'");
@@ -65,7 +65,7 @@
     "Returned array for 'en' contains localized resource");
 
   /* --- [NSBundle -pathsForResourcesOfType:inDirectory:forLocalization:] --- 
*/
-  arr = [bundle pathsForResourcesOfType:@"txt" inDirectory: nil
+  arr = [bundle pathsForResourcesOfType: @"txt" inDirectory: nil
     forLocalization: @"German"];
   PASS((arr && [arr count]),
     "-pathsForResources... returns an array for 'German'");


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to