Remove the libobjc tests; they have been converted to atf and now live in

tests/lib/libobjc/.
This commit is contained in:
jmmv 2010-07-18 12:44:38 +00:00
parent 5397c7b6af
commit b85cea17a2
6 changed files with 2 additions and 109 deletions

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.18 2010/07/17 19:29:33 jmmv Exp $
# $NetBSD: Makefile,v 1.19 2010/07/18 12:44:38 jmmv Exp $
# missing: libexec sbin usr.sbin share
SUBDIR+= gnu lib libexec sys usr.bin
SUBDIR+= lib libexec sys usr.bin
.include <bsd.subdir.mk>

View File

@ -1,5 +0,0 @@
# $NetBSD: Makefile,v 1.1 2008/02/08 20:04:50 christos Exp $
SUBDIR+= lib
.include <bsd.subdir.mk>

View File

@ -1,5 +0,0 @@
# $NetBSD: Makefile,v 1.1 2008/02/08 20:04:50 christos Exp $
SUBDIR+= libobjc
.include <bsd.subdir.mk>

View File

@ -1,5 +0,0 @@
# $NetBSD: Makefile,v 1.1 2008/02/08 20:04:50 christos Exp $
SUBDIR+= thread
.include <bsd.subdir.mk>

View File

@ -1,15 +0,0 @@
# $NetBSD: Makefile,v 1.2 2008/02/09 08:38:08 mrg Exp $
NOMAN= # defined
PROG= thread
WARNS?= 4
CFLAGS+=-pthread
LDFLAGS+=-pthread
DPADD+=${LIBOBJC}
LDADD+=-lobjc
regress: ${PROG}
./${PROG}
.include <bsd.prog.mk>

View File

@ -1,77 +0,0 @@
/* Written by David Wetzel */
#include <assert.h>
#include <stdio.h>
#include <unistd.h>
#include <objc/objc.h>
#include <objc/objc-api.h>
#include <objc/Object.h>
static const int debug = 0;
@interface MyClass : Object
{
char *myName;
}
-(void)setMyName:(const char *)n;
-(const char *)myName;
@end
@implementation MyClass
-(void)setMyName:(const char *)n
{
size_t len;
if (myName) {
if (strcmp(myName, n) != 0)
return;
objc_free(myName);
}
len = strlen(n) + 1;
myName = objc_malloc(len);
strcpy(myName, n);
}
-(char *)myName
{
return myName;
}
-(void)start
{
if (debug)
printf("detached thread started!\n");
}
@end
static void
becomeMultiThreaded(void)
{
if (debug)
printf("becoming multithreaded!\n");
}
int
main(int argc, char *argv[])
{
id o = [MyClass new];
const char *c;
objc_thread_callback cb;
objc_thread_t rv;
[o setMyName:"thread"];
c = [o myName];
if (debug)
printf("Testing: %s\n",c);
cb = objc_set_thread_callback(becomeMultiThreaded);
if (debug)
printf("Old Callback: %p\n",cb);
rv = objc_thread_detach(@selector(start), o, nil);
if (debug)
printf("detach value: %p\n",rv);
assert(rv != NULL);
return 0;
}