Back-port constant string test from newabi branch.

main
David Chisnall 8 years ago
parent f2b5988596
commit 554c6623dc

@ -1,19 +1,10 @@
#import "Test.h"
#include <string.h>
@interface NSConstantString : Test
{
const char * const str;
const unsigned int len;
}
- (unsigned int)length;
- (const char*)cString;
@end
@implementation NSConstantString
- (unsigned int)length
{
return len;
return length;
}
- (const char*)cString
{

@ -23,6 +23,27 @@ __attribute__((objc_root_class))
#endif
@end
#ifdef __OBJC_GNUSTEP_RUNTIME_ABI__
# if __OBJC_GNUSTEP_RUNTIME_ABI__ >= 20
# define NEW_ABI
# endif
#endif
@interface NSConstantString : Test
{
#ifdef NEW_ABI
uint32_t flags;
uint32_t length;
uint32_t size;
uint32_t hash;
const char * const str;
#else
const char * const str;
const unsigned int length;
#endif
}
@end
@interface NSAutoreleasePool : Test
@end

@ -8,3 +8,5 @@
#define SINGLE_FILE_TEST 1
#endif
#include "Test.h"
@implementation NSConstantString @end

Loading…
Cancel
Save