mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Merge pull request #255 from gnustep/coding-msvc-test-fixes
NSArchiver Unit Test Fixes (Size of BOOL) on Windows MSVC
This commit is contained in:
commit
8e0dc2ace6
16 changed files with 17 additions and 11 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -10,6 +10,7 @@ Tests/base/*/GNUmakefile
|
|||
*.sum
|
||||
|
||||
# Test products
|
||||
Tests/base/coding/*.type
|
||||
Tests/base/NSBundle/Resources/TestBundle.bundle/
|
||||
Tests/base/NSBundle/Resources/TestFramework.framework/
|
||||
Tests/base/NSBundle/Resources/derived_src/
|
||||
|
@ -67,4 +68,4 @@ DerivedData/
|
|||
### Xcode Patch ###
|
||||
**/xcshareddata/WorkspaceSettings.xcsettings
|
||||
|
||||
# End of https://www.gitignore.io/api/xcode
|
||||
# End of https://www.gitignore.io/api/xcode
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2022-08-04 Hugo Melder <contact@hugomelder.com>
|
||||
|
||||
* Tests/base/coding/basictypes.m:
|
||||
Fetch the generated .type file directly to avoid size mismatches.
|
||||
* .gitignore:
|
||||
Ignore .type files in the coding unit test directory.
|
||||
|
||||
2022-07-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSHTTPURLHandle.m:
|
||||
|
|
Binary file not shown.
|
@ -114,15 +114,10 @@ void testReadBasicType_##testName (char *pre, testType *expect, testType *toDeco
|
|||
NSData *data; \
|
||||
NSUnarchiver *unArch; \
|
||||
NSString *str2; \
|
||||
NSArray *encodedFiles; \
|
||||
NSString *prefix = [[NSString stringWithCString:pre] retain]; \
|
||||
unsigned int i, c; \
|
||||
encodedFiles = [[NSBundle bundleWithPath: [fm currentDirectoryPath]] \
|
||||
pathsForResourcesOfType:@"type" inDirectory:nil]; \
|
||||
for (i = 0, c = [encodedFiles count]; i < c; i++) \
|
||||
{ \
|
||||
NSString *fileName = [encodedFiles objectAtIndex:i]; \
|
||||
if ([[fileName lastPathComponent] hasPrefix:prefix]) \
|
||||
NSString *fileName; \
|
||||
long typeSize = sizeof(testType); \
|
||||
fileName = [[NSString stringWithFormat:@"%s-%li.type",pre,typeSize] retain]; \
|
||||
if ([fm isReadableFileAtPath:fileName]) \
|
||||
{ \
|
||||
data = [NSData dataWithContentsOfFile:fileName]; \
|
||||
unArch = [[NSUnarchiver alloc] initForReadingWithData:data]; \
|
||||
|
@ -136,7 +131,10 @@ void testReadBasicType_##testName (char *pre, testType *expect, testType *toDeco
|
|||
PASS((VAL_TEST(*expect,*toDecode) && [str isEqual:str2]), \
|
||||
"can unarchive %s from %s", pre, [fileName UTF8String]); \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
PASS(1 == 2, "Archive %s not found.", [fileName UTF8String]); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define VAL_TEST(testX,testY) testX == testY
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue