Updated to work on NS3.3.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1477 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1996-04-18 14:04:36 +00:00
parent 26d90fec56
commit df98385294

View file

@ -1,7 +1,14 @@
/* Test NSArchiver on encoding of self-referential forward references. */ /* Test NSArchiver on encoding of self-referential forward references. */
#ifdef NX_CURRENT_COMPILER_RELEASE
#include <foundation/NSArchiver.h>
#include <foundation/NSArray.h>
#include <foundation/NSAutoreleasePool.h>
#else
#include <Foundation/NSArchiver.h> #include <Foundation/NSArchiver.h>
#include <Foundation/NSArray.h> #include <Foundation/NSArray.h>
#include <Foundation/NSAutoreleasePool.h>
#endif
/* Use GNU Archiving features, if they are available. */ /* Use GNU Archiving features, if they are available. */
#define TRY_GNU_ARCHIVING 1 #define TRY_GNU_ARCHIVING 1
@ -9,7 +16,8 @@
/* The -initWithCoder methods substitutes another object for self. */ /* The -initWithCoder methods substitutes another object for self. */
static int decode_substitutes; static int decode_substitutes;
#define GNU_ARCHIVING (TRY_GNU_ARCHIVING && defined(OBJECTS_MAJOR_VERSION)) #define GNU_ARCHIVING \
(TRY_GNU_ARCHIVING && defined(GNUSTEP_BASE_MAJOR_VERSION))
#if GNU_ARCHIVING #if GNU_ARCHIVING
#include <gnustep/base/Archiver.h> #include <gnustep/base/Archiver.h>
@ -217,6 +225,7 @@ test_self_fref ()
int int
main () main ()
{ {
id arp = [NSAutoreleasePool new];
#if TEXTCSTREAM #if TEXTCSTREAM
[Archiver setDefaultCStreamClass: [TextCStream class]]; [Archiver setDefaultCStreamClass: [TextCStream class]];
@ -225,12 +234,7 @@ main ()
test_fref (); test_fref ();
test_self_fref (); test_self_fref ();
#if 0 [arp release];
printf ("foo 0x%x sub_foo 0x%x\n",
(unsigned)foo, (unsigned)sub_foo);
printf ("sub_foo 0x%x super_foo 0x%x\n",
(unsigned)sub_foo, (unsigned)[sub_foo superFoo]);
#endif
exit (0); exit (0);
} }